Adriaan van Os wrote:
Here is a first report of my attempt to build GPC-20021128 with the GCC-3.2.1 backend on Mac OS X "Darwin". The GPC build is on a 1.1 GB 450 MHz PowerMac G4 running Mac OS X 10.2.
Note: I am also trying to build GPC with an Apple-patched GCC backend (named "GCC3-1151"), but I will report about that separately.
P r o b l e m 1
During Configure, conftest crashes, but the Configure process happily continues. This is not a GPC problem. The crash also appears if I try to build GCC-3.2.1 (without GPC).
P r o b l e m 2
The file "builtin-attrs.def" causes problems. This is not a GPC problem either: same problems if I try to build GCC (without GPC). Being a C ignoramus, I simply commented away the offending lines (in order to at least continue the build process).
I won't comment further on them. Maybe they've been fixed in the patrched GCC sources, and hopefully those fixes will get into the mainline GCC soon (as has been done on other platforms before).
P r o b l e m 3
A stament in the file stmt.c" causes problems.
/Users/adriaan/gpcx/gcc/stmt.c:5170:21: attempt to use poisoned "calloc"
The C source reads:
if (size > 0 && size < 600000 /* We deliberately use calloc here, not cmalloc, so that we can suppress this optimization if we don't have enough memory rather than aborting, as xmalloc would do. */ && (cases_seen = (unsigned char *) really_call_calloc (bytes_needed, 1)) != NULL)
Being a C ignoramus, I changed "really_call_calloc" into "xcalloc" (to at least continue the build process).
This also seems to be a GCC problem. I'm not sure which consequences your change has. Otherwise you might want to try removing the `#pragma GCC poison ... calloc' in gcc/system.h.
BTW, which version of GCC (or another C compiler?) did you use for building? I had some problems when building gcc-3.2 with gcc-3.1 on Linux/libc5 (similar to your problem 2). If possible, and you haven't already done so, try using a gcc-3.2 binary for building.
P r o b l e m 4
The next problem seems to be GPC related. I guess that the GPC experts will be able to help here. The build process ends with the statement:
cpp-precomp: could not open 'RTS_VERSION_CHECK="__GPC_RTS_VERSION_20021128__"'
gcc -o p/util.o -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -I. -Ip -I/Users/adriaan/gpcx/gcc -I/Users/adriaan/gpcx/gcc/p -I/Users/adriaan/gpcx/gcc/config -I/Users/adriaan/gpcx/gcc/../include -DGPC -I/Users/adriaan/gpcx/gcc/p -D RTS_VERSION_CHECK=""__GPC_RTS_VERSION_`cat /Users/adriaan/gpcx/gcc/p/rts/rts-version`__"" /Users/adriaan/gpcx/gcc/p/util.c cpp-precomp: could not open 'RTS_VERSION_CHECK="__GPC_RTS_VERSION_20021128__"' make[1]: *** [p/util.o] Error 1 make: *** [all-gcc] Error 2
Try removing the space after `-D' in p/Make-lang.in.
Frank