[oe] [PATCH][meta-oe] efivar: fix PIC not found

Hongxu Jia hongxu.jia at windriver.com
Tue Aug 23 07:21:50 UTC 2016


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 at 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 at windriver.com>
---
 meta-oe/recipes-extended/efivar/efivar_0.24.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-extended/efivar/efivar_0.24.bb b/meta-oe/recipes-extended/efivar/efivar_0.24.bb
index 35412b6..efffde5 100644
--- a/meta-oe/recipes-extended/efivar/efivar_0.24.bb
+++ b/meta-oe/recipes-extended/efivar/efivar_0.24.bb
@@ -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 \
-- 
2.8.1




More information about the Openembedded-devel mailing list