From 0d53201a5c3907059241600196121d90f91b4d96 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Mon, 24 Feb 2025 20:58:12 +0100 Subject: [PATCH] atf: fix build This is a target package, and as such config/functions set all sorts of "target compiler" options, but atf needs to be build with the "kernel compiler", e.g. aarch64 and not armv8a. So unset all the wrong envvars from the wrong toolchain to not confuse the atf build system. --- packages/tools/atf/package.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/tools/atf/package.mk b/packages/tools/atf/package.mk index 213b04c097..293ab2fcaa 100644 --- a/packages/tools/atf/package.mk +++ b/packages/tools/atf/package.mk @@ -21,12 +21,13 @@ fi make_target() { # As of atf 2.11.0 - the supported compile for .S is gcc (not as.) - unset AS + unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP STRIP RANLIB + unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS if [ "${ATF_PLATFORM}" = "imx8mq" ]; then - CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="" CFLAGS="" make PLAT=${ATF_PLATFORM} LOG_LEVEL=0 bl31 + CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" make PLAT=${ATF_PLATFORM} LOG_LEVEL=0 bl31 else # as of atf 2.12.0 - sun50i_a64 builds use LTO, include -ffat-lto-objects to support this - CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="" CFLAGS="-ffat-lto-objects" make PLAT=${ATF_PLATFORM} bl31 + CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" CFLAGS="-ffat-lto-objects" make PLAT=${ATF_PLATFORM} bl31 fi }