[compiler-rt] PATCH: Add -fno-lto to OSLDFLAGS for Linux
Kostya Serebryany
kcc at google.com
Wed Mar 4 12:35:04 PST 2015
+dvyukov
On Tue, Mar 3, 2015 at 4:14 PM, H.J. Lu <hjl.tools at gmail.com> wrote:
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150304/4f2eabcf/attachment.html>
More information about the llvm-commits
mailing list