[HOTFIX][GCC 4.9] build/prebuild/ld: -plugin: unknown option
authorAntonio Gomes <a1.gomes@samsung.com>
Wed, 11 Feb 2015 13:16:31 +0000 (05:16 -0800)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
commit742f73ab197188f951b0c9e202cba1617ceaf1b2
tree712e475a4d8e6efc25e715d6f3e7354c78831aaf
parent80a64f9f5fa05585a39bd906c51f9c9511689856
[HOTFIX][GCC 4.9] build/prebuild/ld: -plugin: unknown option

In GCC 4.9, the linker (either bfd or gold) is called with the -plugin argument
which our current bundled gold linker (in build/prebuild) does not accept.

[ XXs] /(..)/chromium-efl-40.2214.38.06/build/prebuild/ld: -plugin: unknown option

Since our gold a x64 64bit statically linked binary, even if we rebuild it
with plugin support enabled, the plugin being loaded would be a 32bit ARM binary.
and load would fail.

[  XXs] (..)/build/prebuild/ld: error: /usr/lib/gcc/armv7l-tizen-linux-gnueabi/<gcc version>/liblto_plugin.so:
could not load plugin library: /usr/lib/gcc/armv7l-tizen-linux-gnueabi/<gcc version>/liblto_plugin.so:
wrong ELF class: ELFCLASS32

So, as a work around to the problem, patch disables the linker's plugins
with '-fno-use-linker-plugin', as per https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ .

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=11089#c5
Reviewed by: Piotr Tworek, joonhwan kwon

Change-Id: Ibf408bdc0fb7cd464b59eef53a26215b67fc3c34
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/impl/chromium-efl.gypi