Marc:
on MacOS X 10.4.1, using Xcode 2.1 gcc (build 5026), configured with
env CC='gcc -mcpu=970 -m64 -force_cpusubtype_ALL -g' ./configure --enable-single-host --enable-shared
I get the following "Illegal instruction" problem:
[descartes:~] lucier% gdb gsi GNU gdb 6.1-20040303 (Apple version gdb-413) (Wed May 18 10:17:02 GMT 2005) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin"...Reading symbols for shared libraries .... done
(gdb) run Starting program: /usr/local/Gambit-C/bin/gsi Reading symbols for shared libraries .+.++ done
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand. 0x0000000000b5a7fc in ?? () (gdb) where #0 0x0000000000b5a7fc in ?? () #1 0x000000000043bd88 in ___H__20___num (___ps=0x0) at _num.c:6270 #2 0x0000000000407968 in for_each_module (mol=0x0, proc=0) at setup.c:542 #3 0x0000000000407944 in for_each_module (mol=0x0, proc=0x407a00 <setup_module_phase1>) at setup.c:535 #4 0x0000000000407944 in for_each_module (mol=0x0, proc=0x407a00 <setup_module_phase1>) at setup.c:535 #5 0x00000000004082c8 in setup_modules (mol=0x71d8) at setup.c:900 #6 0x0000000000409bc8 in ___setup (setup_params=<incomplete type>) at setup.c:2643 #7 0x0000000000406e88 in ___main (linker=0xd5f) at main.c:549 #8 0x0000000000412f74 in ___main_char (argc=0, argv=0x7fffefffff6a8, linker=0x377c <____20___gsi__>, script_line=0x0) at os_base.c:240 #9 0x00000000000037c8 in main (argc=0, argv=0x69a848) at _gsi_.c:6951
I have
DYLD_LIBRARY_PATH=/usr/local/Gambit-C/lib/
OK, I just tried it with the FSF gcc-4.0.0 and it seems to work just fine. Damn.
I haven't been able to check whether Apple's gcc build 5018 works in this context (I'll have to reinstall a special as/ld).
Brad