From: Bastian Germann <bage@xxxxxxxxxxxxx> Building the generated package with CC unset will fail for cross compilation. Detect that and set CC to a sane default prefixed by dpkg-architecture's DEB_HOST_GNU_TYPE variable. Signed-off-by: Bastian Germann <bage@xxxxxxxxxxxxx> --- scripts/package/mkdebian | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index b317d26e2bbf..449e284a449c 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -223,6 +223,14 @@ fi cat <<EOF > debian/rules #!$(command -v $MAKE) -f +include /usr/share/dpkg/architecture.mk + +ifneq (\$(DEB_BUILD_GNU_TYPE),\$(DEB_HOST_GNU_TYPE)) +ifeq (\$(origin CC),default) +CC := \$(DEB_HOST_GNU_TYPE)-gcc +endif +endif + srctree ?= . build-indep: -- 2.30.2