Michael McCracken
2007-Aug-21 23:57 UTC
[LLVMdev] Problems building llvm-gcc-4.2 on ppc32, OS X 10.4.10
Hi, I'm guessing that no one has tried this exact combination yet. I'm trying to build the gcc4.2 front end with current LLVM SVN on a G4 Powerbook running 10.4.10. I started with this: ../gcc4.2-trunk/configure --prefix=$HOME/Documents/hpcl/LLVM/llvm-gcc-4-2/install --enable-llvm=$HOME/Documents/hpcl/LLVM/llvm-svn-obj/ --with-gmp=$HOME/Documents/hpcl/LLVM/llvm-gcc-4-2/libdeps --with-mpfr=$HOME/Documents/hpcl/LLVM/llvm-gcc-4-2/libdeps --enable-languages=c,c++,fortran --with-gxx-include-dir=/usr/include/c++/4.0.0 --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8 and make LLVM_VERSION_INFO=fortran_test And I get this: .. lots .. /Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/build/./gcc/xgcc -B/Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/build/./gcc/ -B/Users/mm ccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/install/powerpc-apple-darwin8/bin/ -B/Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/install/powerpc -apple-darwin8/lib/ -isystem /Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/install/powerpc-apple-darwin8/include -isystem /Users/mmccrack/ Documents/hpcl/LLVM/llvm-gcc-4-2/install/powerpc-apple-darwin8/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-pro totypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -Wa,-force_cpusubtype_ALL -pipe -mmacosx-version-min=10.4 -g -DHAVE_ GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I./../intl -I ../../trunk/gcc/../libcpp/include -I/Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/libdeps/include -I/Users/mmccrack/Documents/hpcl/LLVM/ll vm-gcc-4-2/libdeps/include -I../../trunk/gcc/../libdecnumber -I../libdecnumber -I/Users/mmccrack/Documents/hpcl/LLVM/llvm-svn/include -I/User s/mmccrack/Documents/hpcl/LLVM/llvm-svn-obj//include -m64 -fvisibility=hidden -DHIDE_EXPORTS -c ../../trunk/gcc/config/rs6000/ppc64-fp.c -o l ibgcc/ppc64/ppc64-fp.o In file included from ../../trunk/gcc/config/rs6000/ppc64-fp.c:35: ../../trunk/gcc/config/fp-bit.h:100: error: unable to emulate 'TF' So I think, why am I building ppc64? Taking a cue from the way to build 32-bit only for x86, I add --disable-mulitlib to the configure line and get a little further with the make: MLIBS=`/Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/build/./gcc/xgcc -B/Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/build/./gcc/ -B/Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/install/powerpc-apple-darwin8/bin/ -B/Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/install/powerpc-apple-darwin8/lib/ -isystem /Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/install/powerpc-apple-darwin8/include -isystem /Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/install/powerpc-apple-darwin8/sys-include --print-multi-lib \ | sed -e 's/;.*$//' -e '/^\.$/d'` ; \ for mlib in '' $MLIBS ; do \ strip -o libgcc_s.10.5.dylib_T${mlib} \ -s ../../trunk/gcc/config/rs6000/darwin-libgcc.10.5.ver -c -u \ ./${mlib}/libgcc_s.1.dylib.tmp || exit 1 ; \ done strip: symbols names listed in: ../../trunk/gcc/config/rs6000/darwin-libgcc.10.5.ver not in: /Users/mmccrack/Documents/hpcl/LLVM/llvm-gcc-4-2/build/gcc/libgcc_s.1.dylib.tmp ___floatunditf make[3]: *** [libgcc_s.10.5.dylib] Error 1 So I think, why am I building for 10.5? No wonder that doesn't link. However, I'm not really sure how to fix this, so I thought I'd ask the list if anyone has managed to build gcc4.2 on an old G4? Thanks, -mike -- Michael McCracken UCSD CSE PhD Candidate research: http://www.cse.ucsd.edu/~mmccrack/ misc: http://michael-mccracken.net/wp/