Source: arm-trusted-firmware Version: 2.4+dfsg-2 Severity: normal Tags: patch
Hello. Dpkg-architecture and debhelper set the conventional CC. tools/*/Makefile use HOSTCC instead. The attached patch sets the compiler even for native builds, this does not hurt.
>From 4c42e4b2d5cc3642515317427b6612f4887e02e5 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Sun, 28 Mar 2021 10:29:56 +0200 Subject: [PATCH 4/7] Fix cross build of tools by setting HOSTCC from CC Dpkg-architecture and debhelper set the conventional CC. tools/*/Makefile use HOSTCC instead. Set the compiler even for native builds, this does not hurt. --- debian/rules | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index b85f6e3fb..b7fd8ac7e 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,7 @@ #!/usr/bin/make -f include /usr/share/dpkg/architecture.mk +include /usr/share/dpkg/buildtools.mk export DH_VERBOSE=1 export TF_CFLAGS += -ffile-prefix-map=$(CURDIR)=. @@ -18,8 +19,8 @@ endif override_dh_auto_build: # Disable building of arm-trusted-firmware-tools ifeq ($(filter pkg.arm-trusted-firmware.notools,$(DEB_BUILD_PROFILES)),) - dh_auto_build --sourcedir=tools/fiptool -- DEBUG=1 V=$(VERBOSE) HOSTCCFLAGS="$(CFLAGS) $(CPPFLAGS)" - dh_auto_build --sourcedir=tools/cert_create -- DEBUG=1 V=$(VERBOSE) HOSTCCFLAGS="$(CFLAGS) $(CPPFLAGS) -std=c99 -DUSE_TBBR_DEFS=1" + dh_auto_build --sourcedir=tools/fiptool -- DEBUG=1 V=$(VERBOSE) HOSTCC=$(CC) HOSTCCFLAGS="$(CFLAGS) $(CPPFLAGS)" + dh_auto_build --sourcedir=tools/cert_create -- DEBUG=1 V=$(VERBOSE) HOSTCC=$(CC) HOSTCCFLAGS="$(CFLAGS) $(CPPFLAGS) -std=c99 -DUSE_TBBR_DEFS=1" endif # Only build firmware on arm64. ifeq ($(DEB_HOST_ARCH),arm64) -- 2.30.2