Blady wrote:
<flushleft><fontfamily><param>Helvetica</param><x-tabstops><param>28L;56L;84L;112L;140L;168L;196L;224L;252L;280L;308L;336L;0L;</param>Hi,
[...]
First of all: Your mail is *very* hard to read because of all these tags (they don't even appear to be HTML... what is it???). Please, when posting to this list, turn off all such tags, and use a reasonable line length (68 or 72 characters), thanks.
<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:650: undeclared identifier `$10' (first use in this routine)
<bold>/Users/pascal/Documents/GCC2/gcc-2/gcc/p/rts/error.pas:897: undeclared identifier `$deadbeef' (first use in this routine)
Whoa, Borland-style hex numbers are mistaken as identifiers...
then I type this that fix it:
make CFLAGS="-O -DMACOSX -g -fno-dollars-in-identifiers"
I see. The option `--dollars-in-identifiers' enables `$' in identifiers, thereby breaking Borland-style hex numbers. Usually it is off by default, but apparently for some reason it's on by default in Max OS X (perhaps for GCC because there are system routines with `$' in them or something). Well, turning it off, as you did, fixes the problem. I'm now making `-fno-dollars-in-identifiers' the default for GPC on all platforms.
General questions: Is this option useful at all? Does someone (or some other Pascal compiler) use `$' in identifiers, so we should retain this for compatibility, or is it just a GCC relic that we can drop?
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 ""
AFAIR, the same holds for MS-Windows (at least Mingw, not sure about CygWin). I think the setting of MATH_LIBRARY in ../config/i386/mingw32.h makes sure that -lm is not linked there without haveing to change gpc.c. The same should be possible for Mac OS X, I guess, in the appropriate config file. If you find it, you can send us that change, so we can include it...
- link error :
/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
Is there an explanation for that ?
It seems to have something to do with GPC using `__builtin_strlen' and `__builtin_memcpy' for some CString operations. Apparently, they don't work well here.
Try replacing `__builtin_strlen' (3 times in rts.c) and `__builtin_memcpy' (once in util.c) by simply `strlen' and `memcpy', then rebuild GPC, and let me know if this works.
Frank