From patchwork Mon Oct 17 11:48:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1690872 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=kY8RNkro; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MrZyW2KJ1z23jp for ; Mon, 17 Oct 2022 22:48:49 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1okObi-0001FB-Af; Mon, 17 Oct 2022 11:48:34 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1okObh-0001F4-1x for kernel-team@lists.ubuntu.com; Mon, 17 Oct 2022 11:48:33 +0000 Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 4952F3F465 for ; Mon, 17 Oct 2022 11:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1666007312; bh=NiBAq1VGeODTyfMp40dzmUwtAIA8My4OHpW1kWZfnh4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=kY8RNkroa95E4BkAGpmKc/VRJz79H8bwRrIY2/aCxTO/evfwBdv4vp58YK1FOhzE3 CbOEKx1BOfcIZUcES7F2NGW8aR0Fp4dcLA0uvPyX8oQomoGywZBHF1gPkqzRrGytSF KNscGU9R/EM/9t47fATQvLDQFv6iAQ11N2A55AM/Kli539wsvTPtDc94/NLNPbtyQu YuGGTlc8eracG9ABNYTGEw1s7VBKwJquqf9vX4hc34xt4os/ccENnJBxuuelUjekbF 4dgZfjgQCHxG0zIfSGCT9hVtgbJP41Fy33GtF+0Kf/dchq/gQ2rV5f0VbXs8stf1Xg ip8ChvNU9My0Q== Received: by mail-qk1-f198.google.com with SMTP id bq17-20020a05620a469100b006eeb0bbe02bso9282762qkb.5 for ; Mon, 17 Oct 2022 04:48:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NiBAq1VGeODTyfMp40dzmUwtAIA8My4OHpW1kWZfnh4=; b=0Akoy2KoNGxjIqZ1DxJgN9tSaSdy+iUQm1lMC5tnnwWoFLbGf8k8l4So7WAQ7tDIBD DzUBxDuLIno2dFuNEhiLkEv75a65z7JmtZMeDKgzlBasCU+b9qmVy+dLzCGSAq4Llxxn Wwn+9WYVRxTGUpXMVD7dNHO0kL8DGkU+NX9ce27cReOlqyFLDg8vi7SY4VDwDDVjhdEA kYyaRg2wcko15H4kO/vV7thDZxwTwGd0hI+vjIbZcPDEu7D74VGjcP6jQYyPPGrbDioz SUoZ7IHszhCgA5dxZ7WF5mxHfEMuf5BhcGaZWe7Fl3/dIQEvHF7PYUAKACtPi5KSR0Hd JU5A== X-Gm-Message-State: ACrzQf1Tq7dTvJcmTW12cjJqh0OJWMN65igHWcJoMSiiCJ1xhRd5P53b 5FKDAr/puLaFPBnhAoA0wNTQICMcggArKAgSB28lHf8K+7k9goddu65yYQQOzUBUZZOc/390b3r J2socKtx0i5+MFdpYfG+H5uPKNm1RBfUH2NUNnlFIKA== X-Received: by 2002:ac8:5fd0:0:b0:39c:e42c:f113 with SMTP id k16-20020ac85fd0000000b0039ce42cf113mr7097804qta.418.1666007310823; Mon, 17 Oct 2022 04:48:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Pt/gATVYgmKT23VHEI8nkBqofHY+mtruNW0RVDPqsGnu+nCRQ+wsk7qgU3dsnEZTMFVSwvA== X-Received: by 2002:ac8:5fd0:0:b0:39c:e42c:f113 with SMTP id k16-20020ac85fd0000000b0039ce42cf113mr7097789qta.418.1666007310538; Mon, 17 Oct 2022 04:48:30 -0700 (PDT) Received: from localhost ([2001:67c:1562:8007::aac:415c]) by smtp.gmail.com with ESMTPSA id dt26-20020a05620a479a00b006ceb933a9fesm9417230qkb.81.2022.10.17.04.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 04:48:29 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [KINETIC][SRU][PATCH] UBUNTU: [Packaging] Support arch-specific compilers in updateconfigs Date: Mon, 17 Oct 2022 12:48:22 +0100 Message-Id: <20221017114822.474788-1-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" 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 Acked-by: Tim Gardner Acked-by: Stefan Bader --- 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@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