This raises a similar question, that I had been wondering about ...
If "gcc" has been ported or targeted (ie. as a cross-compiler) to a particular platform, does this mean that "gpc" can be readily (ie. easily) ported or targeted to the same platform? For example, I have seen mention of (but have not located) a "gcc" cross-compiler for the Motorola 68HC11 microcontroller - could this be used with "gpc" to make a Pascal cross-compiler for the 68HC11?
Joe.
-----Original Message----- From: strobe anarkhos [SMTP:anarkhos@mac.com] Sent: Friday, October 05, 2001 2:21 PM To: gpc@gnu.de Subject: Darwin port possible?
Is this project still alive?
I'd like to know if anybody has tried porting gpc to Darwin PPC. Mac OS X has a very large and extensive pascal library called Carbon. It's written in C but all functions are extern pascal. Currently pascal programmers wanting to write applications for OS X have to use an old version of Code Warrior in MacOS and compile a PEF executable. This situation isn't very convenient to say the least. C/C++ programmers can use gcc to compile Mach-O executables, the native binary format for OS X.
(pascal used to be the native programming language for MacOS, but has fallen in favor of C using extern pascal functions and pascal strings. Carbon is a huge library consisting of nearly all APIs accumulated over the decades, and some which were not included have 3rd party implementations like QD3D. Quite possibly this is the largest and most complete set of APIs with pascal interfaces)
As an added benefit it should be possible to adapt Project Builder, the free OS X IDE, for compiling pascal applications. It's already been adapted to compile C++, Java and AppleScript. It already uses gdb for ObjC/C/C++ debugging. Perhaps the old MacApp Object Pascal framework can be revived, if gpc was ported. There is certainly potential for a pascal renaissance given a free compiler coupled with this extensive pascal-based API.
I'm not an expert in gcc internals so I'm not sure if I could do it myself.
da Silva, Joe wrote:
This raises a similar question, that I had been wondering about ...
If "gcc" has been ported or targeted (ie. as a cross-compiler) to a particular platform, does this mean that "gpc" can be readily (ie. easily) ported or targeted to the same platform?
Usually yes. You'd also have to compile the RTS with the newly built (cross-)GPC, but if the target system is somewhat POSIX compatible (and Darwin is AFAIK) there should only a few problems if any.
Frank
At 3:28 PM +0200 10/9/01, Frank Heckenbach wrote:
da Silva, Joe wrote:
This raises a similar question, that I had been wondering about ...
If "gcc" has been ported or targeted (ie. as a cross-compiler) to a particular platform, does this mean that "gpc" can be readily (ie. easily) ported or targeted to the same platform?
Usually yes. You'd also have to compile the RTS with the newly built (cross-)GPC, but if the target system is somewhat POSIX compatible (and Darwin is AFAIK) there should only a few problems if any.
Frank
Considering Darwin has a different linker and binary format, the answer WRT Darwin is "no" unless you're compiling on Darwin.
strobe anarkhos wrote:
At 3:28 PM +0200 10/9/01, Frank Heckenbach wrote:
da Silva, Joe wrote:
This raises a similar question, that I had been wondering about ...
If "gcc" has been ported or targeted (ie. as a cross-compiler) to a particular platform, does this mean that "gpc" can be readily (ie. easily) ported or targeted to the same platform?
Usually yes. You'd also have to compile the RTS with the newly built (cross-)GPC, but if the target system is somewhat POSIX compatible (and Darwin is AFAIK) there should only a few problems if any.
Frank
Considering Darwin has a different linker and binary format, the answer WRT Darwin is "no" unless you're compiling on Darwin.
What do you mean? I'm quite sure that GPC uses the same assembler code and binutils (and therefore the same linker and binary format) as GCC on every platform, so if GCC works (natively and/or cross), then GPC should work the same way.
Frank
Considering Darwin has a different linker and binary format, the answer WRT Darwin is "no" unless you're compiling on Darwin.
What do you mean? I'm quite sure that GPC uses the same assembler code and binutils (and therefore the same linker and binary format) as GCC on every platform, so if GCC works (natively and/or cross), then GPC should work the same way.
Frank
It's not the same linker, and it's not the same gcc.
Apple has submitted like 40klocs to be merged with gcc, only a small portion have, and only for the Darwin version. Non-Darwin developers just don't care, and don't want to merge the differences. Fair enough.
At 3:28 PM +0200 10/9/01, Frank Heckenbach wrote:
da Silva, Joe wrote:
This raises a similar question, that I had been wondering about ...
If "gcc" has been ported or targeted (ie. as a cross-compiler) to a particular platform, does this mean that "gpc" can be readily (ie. easily) ported or targeted to the same platform?
Usually yes. You'd also have to compile the RTS with the newly built (cross-)GPC, but if the target system is somewhat POSIX compatible (and Darwin is AFAIK) there should only a few problems if any.
Frank
Considering Darwin has a different linker and binary format, the answer WRT Darwin is "no" unless you're compiling on Darwin.
Why would a LD be not crosscompilable with respect to Darwin?
Is there something special about its format ? (e.g. copyrighted?)
Maybe you need a development version of binutils, but is to be expected.
Why would a LD be not crosscompilable with respect to Darwin?
Darwin doesn't use LD, it uses DYLD. That's why you often get linker errors trying to port stuff. Why do you think nobody has ported KDE?
There is a compatibility library, which works if you sacrifice a chicken.
Is there something special about its format ? (e.g. copyrighted?)
No, it just happens to NOT be ELF.
Hello, please forgiveme if this is a trivial question.
I have an integer variable and I am looking for the easiest way to convert it to an ascii or hexa form.
sNumber := HexaToAscii( '30414439');
Then sNumber results in '0AD9'
But the string '30414439' is in hexa and it corresponds with the decimal number 809583673.
What function will allow me to obtain that hexa string or the ascii string from the integer number?
Thank you in advance.
Miguel Pérez