[compiler-rt] PATCH: Add -fno-lto to OSLDFLAGS for Linux
H.J. Lu
hjl.tools at gmail.com
Tue Mar 3 16:14:54 PST 2015
Add -fno-lto to OSLDFLAGS for Linux to support build for i386-linux target
on x86-64 machine, using
$ CC="gcc -m32" CXX="g++ -m32" cmake ...
with GCC 4.9 or newer, which pass -plugin to linker by default. Otherwise,
we get
/usr/local32/bin/ld:
/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so: error
loading plugin:
/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so: wrong ELF
class: ELFCLASS64
during
$ PATH=/usr/local32/bin:$PATH CC="gcc -m32" CXX="g++ -m32" cmake ...
--target check-all
when i386 linker is used to work with i386 clang for LTO.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Add-fno-lto-to-OSLDFLAGS-for-Linux.patch
Type: text/x-patch
Size: 1511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150303/1b5c8755/attachment.bin>
More information about the llvm-commits
mailing list