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.
This commit is contained in:
Andre Heider 2025-02-24 20:58:12 +01:00 committed by Rudi Heitbaum
parent 63a3eb2dd5
commit 6f8c89bf2f

View File

@ -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
}