This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Building GCC 4.0.4 on 64 bit Linux


Hi all,
I have to use GCC 4.0.4 (yes I know it is old, I plan to update to a
new version with plugins in the future, but that will take a LOT of
work). I recently started using a 64 bit Ubuntu OS instead of 32 bit.
However I cant seem to get GCC 4.0.4 to compile on this platform.
Basically while compiling I get a link error linking libgcc which is
shown below.

Does anyone know if it is possible to build this version of GCC for 64
bit Ubuntu? I don't mind patching it a little to get it up and
running, but this is the first time I have looked at working with 64
bit platforms and am not familiar with ways around this link problem.

Thanks,
Brendon.

My configure line looked like:
../../dev/gcc-4.0.4/configure -v --enable-languages=c,c++
--prefix=/home/bcosta/build/install --enable-shared --with-system-zlib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu


The link error:

mv 'libgcc/32/tmp-libgcc.map' libgcc/32/libgcc.map
/home/bcosta/build/gcc-4.0.4/gcc/xgcc
-B/home/bcosta/build/gcc-4.0.4/gcc/
-B/home/bcosta/build/install/x86_64-linux-gnu/bin/
-B/home/bcosta/build/install/x86_64-linux-gnu/lib/ -isystem
/home/bcosta/build/install/x86_64-linux-gnu/include -isystem
/home/bcosta/build/install/x86_64-linux-gnu/sys-include -O2  -DIN_GCC
  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -fPIC -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared
-nodefaultlibs -Wl,--soname=libgcc_s.so.1
-Wl,--version-script=libgcc/32/libgcc.map -o 32/libgcc_s.so.1.tmp
-m32 libgcc/32/_muldi3_s.o libgcc/32/_negdi2_s.o
libgcc/32/_lshrdi3_s.o libgcc/32/_ashldi3_s.o libgcc/32/_ashrdi3_s.o
libgcc/32/_cmpdi2_s.o libgcc/32/_ucmpdi2_s.o libgcc/32/_floatdidf_s.o
libgcc/32/_floatdisf_s.o libgcc/32/_fixunsdfsi_s.o
libgcc/32/_fixunssfsi_s.o libgcc/32/_fixunsdfdi_s.o
libgcc/32/_fixdfdi_s.o libgcc/32/_fixunssfdi_s.o
libgcc/32/_fixsfdi_s.o libgcc/32/_fixxfdi_s.o
libgcc/32/_fixunsxfdi_s.o libgcc/32/_floatdixf_s.o
libgcc/32/_fixunsxfsi_s.o libgcc/32/_fixtfdi_s.o
libgcc/32/_fixunstfdi_s.o libgcc/32/_floatditf_s.o
libgcc/32/_clear_cache_s.o libgcc/32/_enable_execute_stack_s.o
libgcc/32/_trampoline_s.o libgcc/32/__main_s.o libgcc/32/_absvsi2_s.o
libgcc/32/_absvdi2_s.o libgcc/32/_addvsi3_s.o libgcc/32/_addvdi3_s.o
libgcc/32/_subvsi3_s.o libgcc/32/_subvdi3_s.o libgcc/32/_mulvsi3_s.o
libgcc/32/_mulvdi3_s.o libgcc/32/_negvsi2_s.o libgcc/32/_negvdi2_s.o
libgcc/32/_ctors_s.o libgcc/32/_ffssi2_s.o libgcc/32/_ffsdi2_s.o
libgcc/32/_clz_s.o libgcc/32/_clzsi2_s.o libgcc/32/_clzdi2_s.o
libgcc/32/_ctzsi2_s.o libgcc/32/_ctzdi2_s.o
libgcc/32/_popcount_tab_s.o libgcc/32/_popcountsi2_s.o
libgcc/32/_popcountdi2_s.o libgcc/32/_paritysi2_s.o
libgcc/32/_paritydi2_s.o libgcc/32/_powisf2_s.o libgcc/32/_powidf2_s.o
libgcc/32/_powixf2_s.o libgcc/32/_powitf2_s.o libgcc/32/_mulsc3_s.o
libgcc/32/_muldc3_s.o libgcc/32/_mulxc3_s.o libgcc/32/_multc3_s.o
libgcc/32/_divsc3_s.o libgcc/32/_divdc3_s.o libgcc/32/_divxc3_s.o
libgcc/32/_divtc3_s.o libgcc/32/_divdi3_s.o libgcc/32/_moddi3_s.o
libgcc/32/_udivdi3_s.o libgcc/32/_umoddi3_s.o
libgcc/32/_udiv_w_sdiv_s.o libgcc/32/_udivmoddi4_s.o
libgcc/32/unwind-dw2_s.o libgcc/32/unwind-dw2-fde-glibc_s.o
libgcc/32/unwind-sjlj_s.o libgcc/32/gthr-gnat_s.o
libgcc/32/unwind-c_s.o -lc && rm -f 32/libgcc_s.so && if [ -f
32/libgcc_s.so.1 ]; then mv -f 32/libgcc_s.so.1
32/libgcc_s.so.1.backup; else true; fi && mv 32/libgcc_s.so.1.tmp
32/libgcc_s.so.1 && ln -s libgcc_s.so.1 32/libgcc_s.so
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when
searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.a when searching for -lc
/usr/bin/ld: i386:x86-64 architecture of input file
`/usr/lib/../lib/crti.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file
`/usr/lib/../lib/crtn.o' is incompatible with i386 output
make[2]: *** [32/libgcc_s.so] Error 1
make[2]: Leaving directory `/home/bcosta/build/gcc-4.0.4/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/home/bcosta/build/gcc-4.0.4/gcc'
make: *** [all-gcc] Error 2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]