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
On 16 Mar 2001, at 3:39, Frank Heckenbach wrote:
(they don't even appear to be HTML... what is it???).
"Enriched text." See RFC 1896.
General questions: Is this option useful at all?
Not for EP, so I have no objection to its removal. ;-)
By default the libm.a library is include in the ld command line so I disable it, since the library is not provided.
AFAIR, the same holds for MS-Windows (at least Mingw, not sure about CygWin).
I don't know about the latest MinGW setup, but my 12/99 version does have a libm.a, although it is a dummy library with no exports.
Cygwin's libm.a is a symlink to libcygwin.a, but the latter library is included in every Cygwin link, so it is redundant.
-- Dave
J. David Bryan wrote:
On 16 Mar 2001, at 3:39, Frank Heckenbach wrote:
(they don't even appear to be HTML... what is it???).
"Enriched text." See RFC 1896.
I see. I must admit I've never seen it before, and I still find it hard to read, especially because of a lot of redundant tags (`<italic></italic>'). Again, everyone please prefer plain text on this list.
General questions: Is this option useful at all?
Not for EP, so I have no objection to its removal. ;-)
If no-one else objects in the next few weeks, I might remove it sometime...
Frank
On 16 Mar 01, at 3:39, Frank Heckenbach wrote:
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?
I have never seen it used in identifiers - and I have seen many Pascal compilers in my life time.
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...
An empty MATH_LIBRARY used to cause no end of problems when compiling GPC for Mingw (I remember having to edit gpc.c manually to make sure that (the empty Mingw) libm.a was linked). This problem has since disappeared, although I cannot remember how we dealt with it! The point is that you need to watch for this under OS X as well. It may not become a problem - or it might. If it does, all you need to is create an empty libm.a.
You might also need to create an "os-hacks.h" file for any special kludges that you might need to do under OS X.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) Author of: Chief's Installer Pro for Win32 http://www.bigfoot.com/~African_Chief/chief32.htm Email: African_Chief@bigfoot.com
Prof Abimbola Olowofoyeku wrote:
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...
An empty MATH_LIBRARY used to cause no end of problems when compiling GPC for Mingw (I remember having to edit gpc.c manually to make sure that (the empty Mingw) libm.a was linked). This problem has since disappeared, although I cannot remember how we dealt with it!
Well, as I said ../config/i386/mingw32.h contains mingw32.h:#define MATH_LIBRARY "" and gpc.c respects this, so unless you changed it, I'd be surprised if -lm (empty or not) is linked.
The point is that you need to watch for this under OS X as well. It may not become a problem - or it might. If it does, all you need to is create an empty libm.a.
This is, of course, a solution -- might also help compiling other sources that link -lm.
Frank
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?
I have never seen it used in identifiers - and I have seen many Pascal compilers in my life time.
I would avoid it, and disable the feature A lot of compilers use $ for mangling, and don't allow '$' in identifiers.
life time.
I would avoid it, and disable the feature A lot of compilers use $ for mangling, and don't allow '$' in identifiers.