From 0505075ae8d339ba097aebb82b4d0ae62f87c0a9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 23 Jul 2017 17:47:43 -0700 Subject: ossp-uuid, libffi, libgcrypt: Pass --tag=CC option to libtool libtool tries to guess the --tag value based on CC/CXX environment variables and the compile commandline generated by makefiles. This heuristics however fails when we construct CC variables in OE and add security flags to it, especially -fPIE -pie which are added by external compilers e.g. clang particularly. It fails because libtool removed PIE flags from compiler cmdline intelligently if it figures out that its building a library, which means that the CC variable passed from cmdline does not match with the compiler cmdline constructed by libtool and we end up with errors like | arm-bec-linux-musleabi-libtool: compile: unable to infer tagged configuration | arm-bec-linux-musleabi-libtool: error: specify a tag with '--tag' This works with internal gcc toolchain because we configure gcc for PIE when hardening is selected and dont pass -fPIE -pie options explicitly but this is not an option for clang, and some external gcc toolchains using older gcc This patch adds the --tag option to help libtool set correct tags in packages where it cant get it right via its heuristics Signed-off-by: Khem Raj Signed-off-by: Ross Burton --- meta/recipes-support/libffi/libffi_3.2.1.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'meta/recipes-support/libffi') diff --git a/meta/recipes-support/libffi/libffi_3.2.1.bb b/meta/recipes-support/libffi/libffi_3.2.1.bb index 2a3f4b743d..57989a2602 100644 --- a/meta/recipes-support/libffi/libffi_3.2.1.bb +++ b/meta/recipes-support/libffi/libffi_3.2.1.bb @@ -20,7 +20,7 @@ SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43" SRC_URI[sha256sum] = "d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37" EXTRA_OECONF += "--disable-builddir" - +EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'" inherit autotools texinfo FILES_${PN}-dev += "${libdir}/libffi-${PV}" @@ -30,3 +30,4 @@ FILES_${PN}-dev += "${libdir}/libffi-${PV}" MIPS_INSTRUCTION_SET = "mips" BBCLASSEXTEND = "native nativesdk" + -- cgit 1.2.3-korg