This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
- From: "rob1weld at aol dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Feb 2009 03:53:33 -0000
- Subject: [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
- References: <bug-39317-13830@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from rob1weld at aol dot com 2009-02-28 03:53 -------
(In reply to comment #4)
> In addition to the lack of "-L..." this is also a 'spec' issue :
> ...
The issue with the spec file is caused by this in the Makefile.in:
# Dump a specs file to make -B./ read these specs over installed ones.
$(SPECS): xgcc$(exeext)
$(GCC_FOR_TARGET) -dumpspecs > tmp-specs
mv tmp-specs $(SPECS)
Debian's supplied gcc 4.3 is built androgynous:
# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)
# gcc -dumpspecs | head -2
*asm:
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} %{m32:--32}
%{m64:--64}
We need to check that the host-compiler's "spec" is correct and fix it.
Here is some pseudo-code:
if ' gcc -dumpspecs | grep \{m32:--32 | grep \{m64:--64 ' then # not correct
if test x`(hostname || uname -n) 2>/dev/null | sed 1q` == "xopensolaris" ;
then
if 'isainfo -k' = 'i386' then
gcc -dumpspecs | sed 2s/m32:--32/!m32:--32/1p
fi
if 'isainfo -k' = 'amd_64' | 'x86_64' then
gcc -dumpspecs | sed 2s/m64:--64/!m64:--64/1p
fi
else # Not OpenSolaris' uname
if 'uname -m' = 'i386' then
gcc -dumpspecs | sed 2s/m32:--32/!m32:--32/1p
fi
if 'uname -m' = 'amd_64' | 'x86_64' then
gcc -dumpspecs | sed 2s/m64:--64/!m64:--64/1p
fi
fi
fi
Rob
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317