efivar: fix PIC not found

Previously, we tweak gcc option for gold linker to workaround
link failure, it caused shared object dependencies missing
while non gold linker:

Print shared object dependencies in target:
......
root@localhost:~# ldd /usr/sbin/efibootmgr
	linux-vdso.so.1 (0x00007ffdbbbe4000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fce48355000)
	PIC => not found
	libefivar.so.0 => /usr/lib64/libefivar.so.0 (0x00007fce4813d000)
	PIC => not found
	libefiboot.so.0 => /usr/lib64/libefiboot.so.0 (0x00007fce47f33000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fce486f2000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fce47d2f000)
......

The efivar dynamic library missing PIC option. Do not apply
gold linker fix while non gold linker.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Hongxu Jia
2016-08-23 03:21:50 -04:00
committed by Martin Jansa
parent 26b1013843
commit 010d99d557
@@ -16,7 +16,7 @@ SRC_URI = "git://github.com/rhinstaller/efivar.git \
"
SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \
file://0003-efivar-fix-for-cross-compile.patch \
file://0004-fix-unknow-option-for-gold-linker.patch \
${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'file://0004-fix-unknow-option-for-gold-linker.patch', '', d)} \
"
SRC_URI_append_class-native = " file://fix-compile-failure-with-host-gcc-4.6.patch \
file://allow-multi-definitions-for-native.patch \