Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2803917rdb; Tue, 26 Dec 2023 05:53:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFV6IUzPoip5swNbE98Jv67NfFnta8EPBxp83mIyELd4LAgYMcAPPdyisaGbyz+Ym8PIABP X-Received: by 2002:a05:6e02:1ba9:b0:35f:f547:6c64 with SMTP id n9-20020a056e021ba900b0035ff5476c64mr7282692ili.117.1703598795558; Tue, 26 Dec 2023 05:53:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703598795; cv=none; d=google.com; s=arc-20160816; b=0x4iUN8kVK+H4LJeLaAOp4axmkf3H85slXlUKtlsUWw5sPJCh/ihU4rAxnMm8i1QhN WYK4OmaJsha5ltfO1pCpC0fqdoJOKWITSmM7urtZRNTSPOnwpdeF/gqXFZP2vRlKlYBT biTJXHLcqi5CITZkiELO4Dc0YLj51luPVMwI2rUeosZ0j+NVNrAoz/r+9VUrs8z9KRet BSDQTjck3qgLPxzQBP87tSoaJgnL0AVe3XZ5/mApikEDY5ZC7wB+7sKUACy9cToeL95w m8VFqh5Ip+jdpBEU4g8x0R227wh14CUiibbgOtDu6qRRwN63UsssEykoLsxo+gcizwNM se8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=D/wWGEI/ZfcPGlpL7Lmcs25vFlxg1k4u89cdIInj5KA=; fh=5gYN4msaJmwnN8mGpibv8VZnTy0MtvGQcf5D09XpoaQ=; b=KTcPHszgpG7kPCzhR3SNMW74GqgpXPCBU7kW0kqDVr4oJodME+4HTo/rMXiv0+BmXO Gefrb9yOwlA27X052lWLlabvwTGpsHpUJNepHYwjR8AX/Th8pRBCdaxYV35kCxjjjRkq 8N0NM4byLPDwC2Hj82I6b1KJvbjAKmE+dZu6Y+ZKhXhlxJ1/KNb39cZar3B6hJ9M1Wj/ CdZs3/tKs7g4QKzFdQTnba6vO3mNW3TlSdDyAVSBTHyOJ9bMXq8zMfGv2gusODeeIoFC LwO4LF2qyculjDate7vknYnkzRqW7XZbSJWs5f1HLjT+72yOXuGHeSlE7TuxKe0KTBLy OvGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="muzM/KiE"; spf=pass (google.com: domain of linux-kernel+bounces-11531-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11531-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y34-20020a634b22000000b005bcfc60520asi9652027pga.586.2023.12.26.05.53.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 05:53:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11531-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="muzM/KiE"; spf=pass (google.com: domain of linux-kernel+bounces-11531-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11531-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2903B28314B for ; Tue, 26 Dec 2023 13:53:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EE7B4F204; Tue, 26 Dec 2023 13:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="muzM/KiE" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E2924F1EC; Tue, 26 Dec 2023 13:52:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 969DAC433CB; Tue, 26 Dec 2023 13:52:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703598778; bh=qV21Ddxy565YeVMxc5SZLejjsKbZ8CTNjuyHTzJU14s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=muzM/KiEaiuwfCK9I8JLbD7PghAhWtcrnCeYuBNt+0ShtQnRV8n5Df7aT0Lpc2hAN N1+3Pv87ppFluNbnEVskEMzSuuHelElRCW48pSbylCY5SauirAP+oGtWEPWFUp4CvG kciQIGtBN+PIkvNl3GzjeTgcbuO4Fwvn/rZJP4pw5zS7O4NLntNqh1hmsgFn/Ly6qw aWubuNusZ4E+iJIzkb6FlTB3N61MIcGBJOyovSmPxXF6LxcoJy4F6WLh473JNwNQd1 /byx4TG9CwIhmHcULXe63+cDKNuqMXEc/TnW8ulT3LWneaKcWGb26YZhXH0IbK/dk+ qJMGtqb5cUDKA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ben Hutchings , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kernel@vger.kernel.org Subject: [PATCH 2/6] kbuild: deb-pkg: squash scripts/package/deb-build-option to debian/rules Date: Tue, 26 Dec 2023 22:52:39 +0900 Message-Id: <20231226135243.1393780-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231226135243.1393780-1-masahiroy@kernel.org> References: <20231226135243.1393780-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The binary-arch target needs to use the same CROSS_COMPILE as used in build-arch; otherwise, 'make run-command' may attempt to resync the .config file. Squash scripts/package/deb-build-option into debian/rules, as it is a small amount of code. Signed-off-by: Masahiro Yamada --- scripts/package/deb-build-option | 14 -------------- scripts/package/debian/rules | 5 +++-- 2 files changed, 3 insertions(+), 16 deletions(-) delete mode 100755 scripts/package/deb-build-option diff --git a/scripts/package/deb-build-option b/scripts/package/deb-build-option deleted file mode 100755 index 7950eff01781..000000000000 --- a/scripts/package/deb-build-option +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0-only - -# Set up CROSS_COMPILE if not defined yet -if [ "${CROSS_COMPILE+set}" != "set" -a "${DEB_HOST_ARCH}" != "${DEB_BUILD_ARCH}" ]; then - echo CROSS_COMPILE=${DEB_HOST_GNU_TYPE}- -fi - -version=$(dpkg-parsechangelog -S Version) -debian_revision="${version##*-}" - -if [ "${version}" != "${debian_revision}" ]; then - echo KBUILD_BUILD_VERSION=${debian_revision} -fi diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules index 26bc6239e200..529b71b55efa 100755 --- a/scripts/package/debian/rules +++ b/scripts/package/debian/rules @@ -10,7 +10,9 @@ ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))) MAKEFLAGS += -j$(NUMJOBS) endif -make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) +revision = $(lastword $(subst -, ,$(shell dpkg-parsechangelog -S Version))) +CROSS_COMPILE ?= $(filter-out $(DEB_BUILD_GNU_TYPE)-, $(DEB_HOST_GNU_TYPE)-) +make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) KBUILD_BUILD_VERSION=$(revision) $(addprefix CROSS_COMPILE=,$(CROSS_COMPILE)) .PHONY: binary binary-indep binary-arch binary: binary-arch binary-indep @@ -24,7 +26,6 @@ build: build-arch build-indep build-indep: build-arch: $(MAKE) -f $(srctree)/Makefile $(make-opts) \ - $(shell $(srctree)/scripts/package/deb-build-option) \ olddefconfig all .PHONY: clean -- 2.40.1