From 740e34f1e7d8cfd6bfd4bda8f78d9763d8cb0ae2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 1 Aug 2017 23:03:06 -0700 Subject: qat16: Fix build when ld-is-gold is set in DISTRO_FEATURES Signed-off-by: Khem Raj Signed-off-by: Saul Wold --- common/recipes-extended/qat/qat16.inc | 2 +- common/recipes-extended/qat/qat16/use-CC-for-LD.patch | 17 +++++++++++++++++ common/recipes-extended/qat/qat16_2.6.0-65.bb | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 common/recipes-extended/qat/qat16/use-CC-for-LD.patch (limited to 'common') diff --git a/common/recipes-extended/qat/qat16.inc b/common/recipes-extended/qat/qat16.inc index d45967a3..cf112bbd 100644 --- a/common/recipes-extended/qat/qat16.inc +++ b/common/recipes-extended/qat/qat16.inc @@ -60,7 +60,7 @@ do_unpack2() { addtask unpack2 after do_unpack before do_patch do_compile () { - export LD="${LD} --hash-style=gnu" + export LD="${CC} -Wl,--hash-style=gnu -nostartfiles -nodefaultlibs" export MACHINE="${TARGET_ARCH}" cd ${S}/quickassist oe_runmake diff --git a/common/recipes-extended/qat/qat16/use-CC-for-LD.patch b/common/recipes-extended/qat/qat16/use-CC-for-LD.patch new file mode 100644 index 00000000..36ceedf4 --- /dev/null +++ b/common/recipes-extended/qat/qat16/use-CC-for-LD.patch @@ -0,0 +1,17 @@ +Use CC to do the linking, helps in linking with gold or bfd linker + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Khem Raj +Index: QAT1.6/quickassist/build_system/build_files/OS/linux_2.6.mk +=================================================================== +--- QAT1.6.orig/quickassist/build_system/build_files/OS/linux_2.6.mk ++++ QAT1.6/quickassist/build_system/build_files/OS/linux_2.6.mk +@@ -89,7 +89,7 @@ EXTRA_CFLAGS+= -Wno-div-by-zero -Wfloat- + endif + + +-LIB_SHARED_FLAGS+=-shared -soname $(LIB_SHARED) ++LIB_SHARED_FLAGS+=-shared -Wl,-soname,$(LIB_SHARED) + LIB_STATIC_FLAGS= + EXE_FLAGS?= + diff --git a/common/recipes-extended/qat/qat16_2.6.0-65.bb b/common/recipes-extended/qat/qat16_2.6.0-65.bb index ba0b4ed4..88cf66c3 100644 --- a/common/recipes-extended/qat/qat16_2.6.0-65.bb +++ b/common/recipes-extended/qat/qat16_2.6.0-65.bb @@ -3,6 +3,7 @@ include qat16.inc SRC_URI += "https://01.org/sites/default/files/page/qatmux.l.2.6.0-60.tgz;name=qat \ file://qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch \ file://qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch \ + file://use-CC-for-LD.patch \ " SRC_URI_append_libc-musl = " file://0001-OsalServices-Only-use-bits-time-with-GLIBC.patch" -- cgit v1.2.3-54-g00ecf