CONFIG_CAIF=m
CONFIG_CAN=m
CONFIG_CB710_CORE=m
-CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 11.3.0-5ubuntu1) 11.3.0"
+CONFIG_CC_VERSION_TEXT="x86_64-linux-gnu-gcc-11 (Ubuntu 11.3.0-5ubuntu1) 11.3.0"
CONFIG_CDROM_PKTCDVD=m
# CONFIG_CMA is not set
CONFIG_CMDLINE_PARTITION=y
CONFIG_CAIF=m
CONFIG_CAN=m
CONFIG_CB710_CORE=m
-CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc (Ubuntu 11.3.0-3ubuntu1) 11.3.0"
+CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc-11 (Ubuntu 11.3.0-3ubuntu1) 11.3.0"
CONFIG_CDROM_PKTCDVD=m
CONFIG_CMA=y
CONFIG_CMDLINE="console=ttyAMA0"
CONFIG_CAIF=m
CONFIG_CAN=m
CONFIG_CB710_CORE=m
-CONFIG_CC_VERSION_TEXT="arm-linux-gnueabihf-gcc (Ubuntu 11.3.0-3ubuntu1) 11.3.0"
+CONFIG_CC_VERSION_TEXT="arm-linux-gnueabihf-gcc-11 (Ubuntu 11.3.0-3ubuntu1) 11.3.0"
CONFIG_CDROM_PKTCDVD=m
CONFIG_CMA=y
CONFIG_CMDLINE=""
CONFIG_CAIF=m
CONFIG_CAN=m
CONFIG_CB710_CORE=m
-CONFIG_CC_VERSION_TEXT="powerpc64le-linux-gnu-gcc (Ubuntu 11.3.0-3ubuntu1) 11.3.0"
+CONFIG_CC_VERSION_TEXT="powerpc64le-linux-gnu-gcc-11 (Ubuntu 11.3.0-3ubuntu1) 11.3.0"
CONFIG_CDROM_PKTCDVD=m
CONFIG_CMA=y
CONFIG_CMDLINE=""
CONFIG_CAIF=m
CONFIG_CAN=m
CONFIG_CB710_CORE=m
-CONFIG_CC_VERSION_TEXT="riscv64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1) 11.3.0"
+CONFIG_CC_VERSION_TEXT="riscv64-linux-gnu-gcc-11 (Ubuntu 11.3.0-1ubuntu1) 11.3.0"
CONFIG_CDROM_PKTCDVD=m
CONFIG_CMA=y
CONFIG_CMDLINE=""
# CONFIG_CAIF is not set
# CONFIG_CAN is not set
# CONFIG_CB710_CORE is not set
-CONFIG_CC_VERSION_TEXT="s390x-linux-gnu-gcc (Ubuntu 11.3.0-3ubuntu1) 11.3.0"
+CONFIG_CC_VERSION_TEXT="s390x-linux-gnu-gcc-11 (Ubuntu 11.3.0-3ubuntu1) 11.3.0"
# CONFIG_CDROM_PKTCDVD is not set
CONFIG_CMA=y
# CONFIG_CMDLINE_PARTITION is not set
-e 's/SRCPKGNAME/$(src_pkg_name)/g' \
-e 's/=HUMAN=/$(human_arch)/g' \
-e 's/=SERIES=/$(series)/g' \
+ -e 's/\(^Build-Depends:$$\)/\1\n$(GCC_BUILD_DEPENDS)/g' \
> $(DEBIAN)/control.stub;
flavours="$(sort $(wildcard $(DEBIAN)/control.d/vars.* $(DEBIAN)/sub-flavours/*.vars))";\
for i in $$flavours; do \
# packaging phase fails, but you can at least compile the kernel quickly.
#
arch := $(DEB_HOST_ARCH)
-ifneq ($(arch),$(DEB_HOST_ARCH))
- CROSS_COMPILE ?= $(shell dpkg-architecture -a$(arch) -qDEB_HOST_GNU_TYPE -f 2>/dev/null)-
-endif
+CROSS_COMPILE ?= $(DEB_HOST_GNU_TYPE)-
#
-# Detect invocations of the form 'dpkg-buildpackage -B -aarmhf' within
-# an x86'en schroot. This is the only way to build all of the packages
-# (except for tools).
+# Set consistent toolchain
+# If a given kernel wants to change this, they can do so via their own
+# $(DEBIAN)/rules.d/hooks.mk and $(DEBIAN)/rules.d/$(arch).mk files
#
-ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
- CROSS_COMPILE ?= $(DEB_HOST_GNU_TYPE)-
-endif
+export gcc?=gcc-11
+GCC_BUILD_DEPENDS=\ $(gcc), $(gcc)-aarch64-linux-gnu [arm64] <cross>, $(gcc)-arm-linux-gnueabihf [armhf] <cross>, $(gcc)-powerpc64le-linux-gnu [ppc64el] <cross>, $(gcc)-riscv64-linux-gnu [riscv64] <cross>, $(gcc)-s390x-linux-gnu [s390x] <cross>, $(gcc)-x86-64-linux-gnu [amd64] <cross>,
abidir := $(CURDIR)/$(DEBIAN)/__abi.current/$(arch)
prev_abidir := $(CURDIR)/$(DEBIAN)/abi/$(arch)
# target_flavour is filled in for each step
kmake = make ARCH=$(build_arch) \
CROSS_COMPILE=$(CROSS_COMPILE) \
+ HOSTCC=$(DEB_BUILD_GNU_TYPE)-$(gcc) \
+ CC=$(CROSS_COMPILE)$(gcc) \
KERNELVERSION=$(abi_release)-$(target_flavour) \
CONFIG_DEBUG_SECTION_MISMATCH=y \
KBUILD_BUILD_VERSION="$(uploadnum)" \
build_O = O=$(builddir)/build-$*
endif
-# Typically supplied from the arch makefile, e.g., debian.master/control.d/armhf.mk
-ifneq ($(gcc),)
-kmake += CC=$(CROSS_COMPILE)$(gcc)
-endif
-
+# TODO this is probably wrong, and should be using $(DEB_HOST_MULTIARCH)
shlibdeps_opts = $(if $(CROSS_COMPILE),-- -l$(CROSS_COMPILE:%-=/usr/%)/lib)
debian/scripts/fix-filenames: debian/scripts/fix-filenames.c
*) echo "$0 called with invalid mode" 1>&2
exit 1 ;;
esac
+
+set -x
+if [ -z "$gcc" ]; then
+ echo "ERROR: gcc environment variable must be set"
+ exit 1
+fi
+
kerneldir="`pwd`"
confdir="$kerneldir/${DEBIAN}/config"
variant="$2"
esac
# Determine cross toolchain to use for Kconfig compiler tests
- cross_compile=""
- deb_build_arch=$(dpkg-architecture -qDEB_BUILD_ARCH -a$arch 2>/dev/null)
- deb_host_arch=$(dpkg-architecture -qDEB_HOST_ARCH -a$arch 2>/dev/null)
- [ $deb_build_arch != $deb_host_arch ] && cross_compile="$(dpkg-architecture -qDEB_HOST_GNU_TYPE -a$arch 2>/dev/null)-"
+ cross_compile="$(dpkg-architecture -qDEB_HOST_GNU_TYPE -a$arch 2>/dev/null)-"
# Environment variables for 'make *config'. We omit CROSS_COMPILE
# for i386 since it is no longer supported after 19.04, however
# we maintain the configs for hwe.
modify_config=true
env="ARCH=$kernarch DEB_ARCH=$arch"
- compiler_path=$(which "${cross_compile}gcc" || true)
+ compiler_path=$(which "${cross_compile}${gcc}" || true)
if [ "$compiler_path" != '' ]; then
- env="$env CROSS_COMPILE=$cross_compile"
+ env="$env CROSS_COMPILE=$cross_compile CC=$compiler_path"
else
echo "WARNING: ${cross_compile}gcc not installed"
modify_config=