binutils 2.19.92 linker broke with --as-needed flag
Alan Modra
amodra@gmail.com
Wed Apr 3 02:20:00 GMT 2013
On Tue, Apr 02, 2013 at 06:51:06PM -0700, Vincent Wen wrote:
> Relocatable linking with relocations from format elf32-i386 (ldgram.o)
> to format elf64-x86-64 (tmpdir/ld-partial.o) is not supported
Your compiler is defaulting to i386 code (-m32) rather than x86_64
code (-m64). It might be because you built your own gcc wrongly (or
your distro did), or you have CFLAGS/CXXFLAGS or CC/CXX set in your
environment, or "gcc" is a script that provides -m32 before calling
the real gcc, or perhaps some other reason. Whatever it is, that
needs fixing, or perhaps may be worked around by configuring binutils
with something like
CC="gcc -m64" CXX="g++ -m64" configure
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list