diff mbox series

[3/3] arm/fiptool: fix native linkage

Message ID 20260909180341.3858400-3-ross.burton@arm.com
State New
Headers show
Series [1/3] arm-bsp/u-boot: enable OpenSSL engine stub API | expand

Commit Message

Ross Burton Sept. 9, 2026, 6:03 p.m. UTC
The Makefiles in TF-A have changed since this recipe was last altered,
and our BUILD_LDFLAGS are no longer being respected. This means the built
objects don't have the correct RPATH, so they fail to run if the host
doesn't have libcrypto.so.4 (from OpenSSL 4) installed.

Pass all of our BUILD_* flags via HOSTCC*, and delete the now redundant
sed operations.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../trusted-firmware-a/fiptool-native_2.15.0.bb       | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/fiptool-native_2.15.0.bb b/meta-arm/recipes-bsp/trusted-firmware-a/fiptool-native_2.15.0.bb
index 11e54fbf06e..8292eefcec3 100644
--- a/meta-arm/recipes-bsp/trusted-firmware-a/fiptool-native_2.15.0.bb
+++ b/meta-arm/recipes-bsp/trusted-firmware-a/fiptool-native_2.15.0.bb
@@ -17,14 +17,13 @@  DEPENDS += "openssl-native"
 
 inherit native
 
-EXTRA_OEMAKE = "V=1 HOSTCC='${BUILD_CC}' OPENSSL_DIR=${STAGING_DIR_NATIVE}/${prefix_native}"
+EXTRA_OEMAKE = "V=1 \
+    HOSTCC='${BUILD_CC}' \
+    HOSTCCFLAGS='${BUILD_CPPFLAGS} ${BUILD_CFLAGS}' \
+    HOSTLDFLAGS='${BUILD_LDFLAGS}' \
+    OPENSSL_DIR=${STAGING_DIR_NATIVE}/${prefix_native}"
 
 do_compile () {
-    # This is still needed to have the native fiptool executing properly by
-    # setting the RPATH
-    sed -i '/^LDOPTS/ s,$, \$\{BUILD_LDFLAGS},' ${S}/tools/fiptool/Makefile
-    sed -i '/^INCLUDE_PATHS/ s,$, \$\{BUILD_CFLAGS},' ${S}/tools/fiptool/Makefile
-
     oe_runmake fiptool
 }