APPLIED[K/U]: [KINETIC][SRU][PATCH] UBUNTU: [Packaging] Support arch-specific compilers in updateconfigs
Andrea Righi
andrea.righi at canonical.com
Wed Oct 26 05:41:46 UTC 2022
On Mon, Oct 17, 2022 at 12:48:22PM +0100, 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>
Applied to kinetic/linux and kinetic/linux-unstable.
Thanks,
-Andrea
> ---
> 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
> --
> 2.34.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list