From 1becb4e422555dc9735c65cc0a0f0d2d534bcc43 Mon Sep 17 00:00:00 2001 From: Christophe Priouzeau Date: Mon, 5 Sep 2022 13:38:57 +0200 Subject: [PATCH] TF-A-TOOLS: adapt opsnssl change for fiptools and certtool Signed-off-by: Christophe Priouzeau --- .../trusted-firmware-a/tf-a-tools_2.6.bb | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/recipes-bsp/trusted-firmware-a/tf-a-tools_2.6.bb b/recipes-bsp/trusted-firmware-a/tf-a-tools_2.6.bb index 4ff527e..a1879a9 100644 --- a/recipes-bsp/trusted-firmware-a/tf-a-tools_2.6.bb +++ b/recipes-bsp/trusted-firmware-a/tf-a-tools_2.6.bb @@ -15,11 +15,28 @@ DEPENDS += "dtc-native openssl" S = "${WORKDIR}/git" -EXTRA_OEMAKE += "HOSTCC='${CC}' OPENSSL_DIR='${STAGING_EXECPREFIXDIR}'" +COMPATIBLE_HOST:class-target = "null" + +HOSTCC:class-native = "${BUILD_CC}" +HOSTCC:class-nativesdk = "${CC}" +EXTRA_OEMAKE += "HOSTCC='${HOSTCC}' OPENSSL_DIR='${STAGING_EXECPREFIXDIR}'" EXTRA_OEMAKE += "certtool fiptool" do_configure[noexec] = "1" +do_compile:prepend:class-native () { + # This is still needed to have the native fiptool executing properly by + # setting the RPATH + sed -e '/^LDLIBS/ s,$, \$\{BUILD_LDFLAGS},' \ + -e '/^INCLUDE_PATHS/ s,$, \$\{BUILD_CFLAGS},' \ + -i ${S}/tools/fiptool/Makefile + # This is still needed to have the native cert_create executing properly by + # setting the RPATH + sed -e '/^LIB_DIR/ s,$, \$\{BUILD_LDFLAGS},' \ + -e '/^INC_DIR/ s,$, \$\{BUILD_CFLAGS},' \ + -i ${S}/tools/cert_create/Makefile +} + do_install() { install -d ${D}${bindir} install -m 0755 \ @@ -28,6 +45,4 @@ do_install() { ${D}${bindir} } -#RDEPENDS:${PN}:class-nativesdk += "nativesdk-libcrypto" - BBCLASSEXTEND += "native nativesdk"