ACK: [KINETIC][SRU][PATCH] UBUNTU: [Packaging] Support arch-specific compilers in updateconfigs

Tim Gardner tim.gardner at canonical.com
Mon Oct 17 17:36:56 UTC 2022


On 10/17/22 5:48 AM, Dimitri John Ledkov wrote:
> BugLink: https://bugs.launchpad.net/bugs/1993120
> 
> For some kernels we had to use different toolchain on per-arch
> basis. Introduce support for such scenario in kernelconfig
> script. This will allow to set gcc=gcc-11 in
> debian.flavour/rules.d/arch.mk. Note this doesn't yet generate correct
> build-dependencies.
> 
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
> ---
>   debian/scripts/misc/kernelconfig | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig
> index 44c1b79d97..d2f94081c3 100755
> --- a/debian/scripts/misc/kernelconfig
> +++ b/debian/scripts/misc/kernelconfig
> @@ -67,12 +67,15 @@ for arch in $archs; do
>   	# Determine cross toolchain to use for Kconfig compiler tests
>   	cross_compile="$(dpkg-architecture -qDEB_HOST_GNU_TYPE -a$arch 2>/dev/null)-"
>   
> +	# Arch-specific compiler, if any
> +	archgcc=$(echo -e "show-%:\n\t at echo \$(\$*)\ninclude $DEBIAN/rules.d/$arch.mk" | make -s -f - show-gcc)
> +
>   	# 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}${archgcc:-$gcc}" || true)
>   	if [ "$compiler_path" != '' ]; then
>   		env="$env CROSS_COMPILE=$cross_compile CC=$compiler_path"
>   	else
Acked-by: Tim Gardner <tim.gardner at canonical.com>

Seems reasonable.
-- 
-----------
Tim Gardner
Canonical, Inc




More information about the kernel-team mailing list