-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Description
Bugzilla Link | 6262 |
Resolution | WORKSFORME |
Resolved on | Aug 06, 2010 01:31 |
Version | trunk |
OS | Linux |
Reporter | LLVM Bugzilla Contributor |
CC | @efriedma-quic |
Extended Description
GCC-4.3.3 fails to build, because some tool named gengtype segfaults. It doesn't segfault, when using gcc to build gcc.
Steps to reproduce:
-
Get this stuff:
http://ftp.gnu.org/gnu/gcc/gcc-4.4.3/gcc-4.4.3.tar.bz2
http://www.mpfr.org/mpfr-2.4.2/mpfr-2.4.2.tar.bz2
http://ftp.gnu.org/gnu/gmp/gmp-5.0.0.tar.bz2 -
Patch gcc with this patch: http://www.linuxfromscratch.org/patches/lfs/development/gcc-4.4.3-startfiles_fix-1.patch
-
unpack gmp and mfr packages into the source directory:
cd gcc-4.3.3/
tar -jxf ../mpfr-2.4.2.tar.bz2
mv -v mpfr-2.4.2 mpfr
tar -jxf ../gmp-5.0.0.tar.bz2
mv -v gmp-5.0.0 gmp -
Make a separate build directory
mkdir -v ../gcc-build
cd ../gcc-build -
configure
CC=clang ../gcc-4.4.3/configure
--target=x86_64-lfs-linux-gnu --prefix=/tools
--disable-nls --disable-shared --disable-multilib
--disable-decimal-float --disable-threads
--disable-libmudflap --disable-libssp
--disable-libgomp --enable-languages=c -
Run make. Notice this output:
make[2]: Entering directory/mnt/lfs/sources/gcc-build/gcc' build/gengtype ../../gcc-4.4.3/gcc gtyp-input.list make[2]: *** [s-gtype] Segmentation fault make[2]: Leaving directory
/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2
Additional information:
Machine type is x86_64, Debian (mostly Lenny). I was trying to follow the Linux From Scratch project, only with clang.
$ file gcc/build/gengtype
gcc/build/gengtype: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped
Program received signal SIGSEGV, Segmentation fault.
0x000000000040c9cc in set_lang_bitmap ()
Current language: auto; currently asm
(gdb) bt
#0 0x000000000040c9cc in set_lang_bitmap ()
#1 0x0000000000404c75 in read_input_list ()
#2 0x0000000000404585 in main ()
(gdb) bt full
#0 0x000000000040c9cc in set_lang_bitmap ()
No locals.
#1 0x0000000000404c75 in read_input_list ()
No locals.
#2 0x0000000000404585 in main ()
No locals.