<flushleft><fontfamily><param>Helvetica</param><x-tabstops><param>28L;56L;84L;112L;140L;168L;196L;224L;252L;280L;308L;336L;0L;</param>Hi,
I bring now more points on my use of gpc on Mac OS X. I use it with gcc 2.95 but I have still some questions.
<bold><x-tabstops><param>72L;144L;216L;288L;360L;0L;</param>1) Dollars in error.pas :
</x-tabstops></bold><x-tabstops><param>72L;144L;216L;288L;360L;0L;</param>
make CFLAGS="-v -O -DMACOSX -g"
...
../.././xgpc -B../.././ -c -I. -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -v -O -DMACOSX -g -DRTS_RELEASE_STRING="'`cat /Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/rts-version`'" --unit-path=/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts --automake /Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas
Reading specs from ../.././specs
Reading specs from /usr/libexec/ppc/specs
Apple Computer, Inc. version cc-2, based on gpc version 20010115, based on gcc-2.95.2 19991024 (release)
gcc version 2.95.2 19991024 (release)
../.././gpcpp -lang-pascal -v -I. -famtmpfile=/var/tmp/cc000268 -funit-path=/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts -fautomake -fdelphi-comments -D__GNU_PASCAL__ -undef -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__GPC__=2 -D__GPC_MINOR__=0 -D__GPC_RELEASE__=20010115 -D__BITS_BIG_ENDIAN__=1 -D__BYTES_BIG_ENDIAN__=1 -D__WORDS_BIG_ENDIAN__=1 -D__ppc__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__ppc__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__OPTIMIZE__ -g -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -D__STDC__ -D__APPLE_CC__=912 -D__DYNAMIC__ -D__OPTIMIZE__=1 -DMACOSX -DRTS_RELEASE_STRING='20010115' /Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas /var/tmp/cc000268.i
GNU Pascal Compiler PreProcessor version 20010115, based on gcc-2.95.2 19991024 (release)
#include "..." search starts here:
#include <<...> search starts here:
.
/usr/local/include/c++
/usr/local/include
/System/Library/Frameworks/System.framework/Headers
/usr/include
End of search list.
../.././gpc1 /var/tmp/cc000268.i -fforce-mem -Wno-four-char-constants -quiet -dumpbase error.pas -g -O -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -version -famtmpfile=/var/tmp/cc000268 -funit-path=/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts -fautomake -o /var/tmp/cc000268.s
GNU Pascal version 2.95.2 19991024 (release) (powerpc-apple-macosx) compiled by GNU C version 2.7.2.1.
GNU Pascal version is actually 20010115, based on gcc-2.95.2 19991024 (release)
Reading specs from ../.././specs
Reading specs from /usr/libexec/ppc/specs
Apple Computer, Inc. version cc-2, based on gpc version 20010115, based on gcc-2.95.2 19991024 (release)
gcc version 2.95.2 19991024 (release)
../.././gpcpp -lang-pascal -v -I. -fautomake -funit-path=/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts -famtmpfile=/var/tmp/cc000268 -fdelphi-comments -D__GNU_PASCAL__ -M -undef -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__GPC__=2 -D__GPC_MINOR__=0 -D__GPC_RELEASE__=20010115 -D__BITS_BIG_ENDIAN__=1 -D__BYTES_BIG_ENDIAN__=1 -D__WORDS_BIG_ENDIAN__=1 -D__ppc__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__ppc__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__OPTIMIZE__ -g -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -D__STDC__ -D__APPLE_CC__=912 -D__DYNAMIC__ -D__OPTIMIZE__=1 -DMACOSX -DRTS_RELEASE_STRING='20010115' /Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/internal.pas -o /var/tmp/cc000271
GNU Pascal Compiler PreProcessor version 20010115, based on gcc-2.95.2 19991024 (release)
#include "..." search starts here:
#include <<...> search starts here:
.
/usr/local/include/c++
/usr/local/include
/System/Library/Frameworks/System.framework/Headers
/usr/include
End of search list.
Reading specs from ../.././specs
Reading specs from /usr/libexec/ppc/specs
Apple Computer, Inc. version cc-2, based on gpc version 20010115, based on gcc-2.95.2 19991024 (release)
gcc version 2.95.2 19991024 (release)
../.././gpcpp -lang-pascal -v -I. -fautomake -funit-path=/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts -famtmpfile=/var/tmp/cc000268 -fdelphi-comments -D__GNU_PASCAL__ -M -undef -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__GPC__=2 -D__GPC_MINOR__=0 -D__GPC_RELEASE__=20010115 -D__BITS_BIG_ENDIAN__=1 -D__BYTES_BIG_ENDIAN__=1 -D__WORDS_BIG_ENDIAN__=1 -D__ppc__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__ppc__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__OPTIMIZE__ -g -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -D__STDC__ -D__APPLE_CC__=912 -D__DYNAMIC__ -D__OPTIMIZE__=1 -DMACOSX -DRTS_RELEASE_STRING='20010115' /Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/string.pas -o /var/tmp/cc000271
GNU Pascal Compiler PreProcessor version 20010115, based on gcc-2.95.2 19991024 (release)
#include "..." search starts here:
#include <<...> search starts here:
.
/usr/local/include/c++
/usr/local/include
/System/Library/Frameworks/System.framework/Headers
/usr/include
End of search list.
/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas: In function `Returnaddr2hex':
<bold>/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:642: undeclared identifier `$f' (first use in this routine)
</bold>/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:642: (Each undeclared identifier is reported only once
/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:642: for each routine it appears in.)
/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:642: subrange bounds are not of the same type
/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:642: ordinal type expected
/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:643: incompatible types in initialization
/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:643: initial value is of wrong type
<bold>/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:650: undeclared identifier `$10' (first use in this routine)
</bold>/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:654: subscripted object is not an array or string
/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas: In procedure `Signalhandler':
<bold>/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:897: undeclared identifier `$deadbeef' (first use in this routine)
</bold>make[1]: *** [error.o] Error 1
make: *** [pascal.rts] Error 2
then I type this that fix it:
make CFLAGS="-O -DMACOSX -g -fno-dollars-in-identifiers"
<bold>2) lib error :
</bold>
By default the libm.a library is include in the ld command line so I disable it, since the library is not provided.
Modifiction of gpc.c :
<< #define MATH_LIBRARY "-lm"
---
//#define MATH_LIBRARY "-lm"
#define MATH_LIBRARY ""
<bold>
3) link error :
</bold>
[localhost:~/Documents/CC/essais] pascal% more essai.p
program Essai;
begin
Writeln('Hello World again.');
end.
[localhost:~/Documents/CC/essais] pascal% gpc -v essai.p
Reading specs from /usr/libexec/ppc/2.95.2/specs
Reading specs from /usr/libexec/ppc/specs
Apple Computer, Inc. version cc-2, based on gpc version 20010115, based on gcc-2.95.2 19991024 (release)
gcc version 2.95.2 19991024 (release)
gpcpp -lang-pascal -v -famtmpfile=/var/tmp/cc000323 -fdelphi-comments -D__GNU_PASCAL__ -undef -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__GPC__=2 -D__GPC_MINOR__=0 -D__GPC_RELEASE__=20010115 -D__BITS_BIG_ENDIAN__=1 -D__BYTES_BIG_ENDIAN__=1 -D__WORDS_BIG_ENDIAN__=1 -D__ppc__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__ppc__ -D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__STDC__ -D__APPLE_CC__=912 -D__DYNAMIC__ essai.p /var/tmp/cc000323.i
GNU Pascal Compiler PreProcessor version 20010115, based on gcc-2.95.2 19991024 (release)
#include "..." search starts here:
#include <<...> search starts here:
/usr/local/include/c++
/usr/local/include
/System/Library/Frameworks/System.framework/Headers
/usr/include
End of search list.
gpc1 /var/tmp/cc000323.i -Wno-four-char-constants -quiet -dumpbase essai.pas -version -famtmpfile=/var/tmp/cc000323 -o /var/tmp/cc000323.s
GNU Pascal version 2.95.2 19991024 (release) (powerpc-apple-macosx) compiled by GNU C version 2.7.2.1.
GNU Pascal version is actually 20010115, based on gcc-2.95.2 19991024 (release)
/usr/libexec/ppc/as -arch ppc -o /var/tmp/cc0003231.o /var/tmp/cc000323.s
/usr/bin/ld -arch ppc -dynamic -lcrt1.o /var/tmp/cc0003231.o -lgpc -lcc_dynamic -framework System
/usr/bin/ld: /usr/lib/libgpc.a(error.o) has external relocation entries in non-writable section (__TEXT,__text) for symbols:
_memcpy
_strlen
By this step, I have no more idea.
<x-tabstops><param>28L;56L;84L;112L;140L;168L;196L;224L;252L;280L;308L;336L;0L;</param>
Is there an explanation for that ?
Thank's for your reply, and best whishes for continuation, Pascal Pignard.
--------------------------
Le Mardi, Décembre 19, 2000, à 02:36 PM, Frank Heckenbach a écrit :
<italic>Hello,</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>> thank's for your reply.</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>> I choose gpc 2.0 release cause of the background release of my cc that is</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>> 2.7.2.1.</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>Yes, this version isn't supported anymore. I.e., you can (probably)</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>compile GPC with gcc-2.7.2.1, but you need the sources of gcc-2.8.1</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>or 2.95.x. Because of increasing internal differences between the</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>gcc versions, we had to drop 2.7.x at some point (and will probably</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>drop 2.8.x sometime next year).</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>> I agree with the fact of using the last release then it becomes more</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>> difficult to</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>> port both cc 2.95 or 3.0 and last gpc.</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>> Though, what are the ports on Mac OS X or Darwin (the unix open souce</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>> layer) ?</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>I'm afraid, I'm not aware of any such ports. If the systems are</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>mostly POSIX compliant (I heard Mac OS X is, and I suppose Darwin is</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>as well), and the backend supports the processor (I'm quite sure it</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>does), and the binutils and system libraries and headers are</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>available (I hope they are), it should not be too difficult to</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>compile the current GCC/GPC versions from sources. There may be</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>problems caused by little incompatibilities, but such problems can</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>usually be sorted out rather easily when you post the error</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>messages. I can't say more at this time...</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>Frank</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>-- </italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>Frank Heckenbach, frank@g-n-u.de</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>http://fjf.gnu.de/</italic><color><param>0000,0000,0000</param>
<italic></italic></color><italic>PGP and GPG keys: http://fjf.gnu.de/plan</italic><color><param>0000,0000,0000</param>
<x-tabstops><param>28L;56L;84L;112L;140L;168L;196L;224L;252L;280L;308L;336L;</param></x-tabstops></color><x-tabstops><param>28L;56L;84L;112L;140L;168L;196L;224L;252L;280L;308L;336L;</param> </x-tabstops></x-tabstops></x-tabstops></x-tabstops></fontfamily></flushleft> F