Problems building GHC 6.0 with gcc 3.3

I'm having problems building GHC 6.0 with GCC 3.3. I've fixed a couple of problems with comments in CPP macros as seen elsewhere, and then everything seemed to be going fine until it came to create stage2/ghc-6.0 and it failed with a huge number of things like stage2/utils/Util.o(.text+0xb8): In function `r4c8_entry': : undefined reference to `GHCziBase_True_closure' stage2/utils/Util.o(.text+0xc8): In function `r4c8_entry': : undefined reference to `GHCziBase_False_closure' In fact, even building hello world with stage1/ghc-inplace failed, starting with ./Foo.o(.text+0x28): In function `sxG_srt': : undefined reference to `GHCziBase_unpackCStringzh_closure' ./Foo.o(.text+0x85): In function `sxG_entry': : undefined reference to `GHCziBase_unpackCStringzh_closure' /home/igloo/ghc6/attempt1/ghc6-6.0/libraries/base/libHSbase.a(Prelude__1.o)(.text+0xa): In function `__stginit_Prelude_': : undefined reference to `_module_registered' /home/igloo/ghc6/attempt1/ghc6-6.0/libraries/base/libHSbase.a(Prelude__1.o)(.text+0x17): In function `__stginit_Prelude_': : undefined reference to `_module_registered' Looking at the first of these I discovered that the split libraries thought that GHCziBase_unpackCStringzh_closure is a local symbol, so ld -x was discarding it. $ ghc6-6.0/ghc/driver/split/ghc-split Base.split_s Base.split Base.split $ gcc -c -o Base.o Base.s $ gcc -c -o Base__131.o Base.split__131.s $ objdump -t Base.o | grep GHCziBase_unpackCStringzh_closure 00000378 g O .data 00000004 GHCziBase_unpackCStringzh_closure $ objdump -t Base__131.o | grep GHCziBase_unpackCStringzh_closure 00000000 l .data 00000000 GHCziBase_unpackCStringzh_closure $ Compiling these files with gcc 2.95 has the same problem. I'm out of my depth here, but I would guess the assembler generated has changed and the evil mangler now goes wrong? I've put the GHC build log, the result of compiling hello world with -v, Base.s, Base.split_s, Base.split, Base.split__131.s at http://urchin.earth.li/~ian/gcc3.3/ Thanks Ian

On Sun, Jun 08, 2003 at 01:40:42PM +0100, Ian Lynagh wrote:
I'm having problems building GHC 6.0 with GCC 3.3. I've fixed a couple
If it helps, I've just done a stage 1 build with "SplitObjs = NO" in mk/build.mk and it makes hello world fine. Also, I forgot to include this last time: $ gcc -v Reading specs from /usr/lib/gcc-lib/i386-linux/3.3/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i386-linux Thread model: posix gcc version 3.3 (Debian) $ Thanks Ian
participants (1)
-
Ian Lynagh