From patchwork Sat Jul 22 04:47:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13322772 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C360FC001DC for ; Sat, 22 Jul 2023 04:48:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230442AbjGVEsa (ORCPT ); Sat, 22 Jul 2023 00:48:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230218AbjGVEsX (ORCPT ); Sat, 22 Jul 2023 00:48:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD5333ABD; Fri, 21 Jul 2023 21:48:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6BBB460A51; Sat, 22 Jul 2023 04:48:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C30ECC433CC; Sat, 22 Jul 2023 04:48:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690001301; bh=t8YlK1uWf9LCj4heDmlRtPcElfIsnxIYNXcfywQoPUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uxEWXM0e+9QgvIdfQvgcDoqV9m3IEmvla0iVylQM5PT1J2ODdzugzDYm3EG4sEuED lST9iTrfjYxA5Zkfrzcoqfv0RdhhLwaXXCrpKa7udV9SvkZ/tGy2CqDgz3IGJeuOhT LevupHhDm6OaLeNnB3dAvhQ+NSAclWISXZA9+iV4QQ6DJixQkFUuaUqS0w5gk3wdoP anML9gFduWlZeRoEh9ebtThfiuAvSAbMOalX/5nTVtjnfFL6AzjYrs2DzojLy2DBZd WO2ukqtqQmCDF6V20TTb4neErFh/QbBjCIGNtKCvGf9SCN5/nVsyaLVC76bJshobn1 MW5yM9pwoZP3Q== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Subject: [PATCH 05/19] kbuild: rpm-pkg: record ARCH option in spec file Date: Sat, 22 Jul 2023 13:47:52 +0900 Message-Id: <20230722044806.3867434-5-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230722044806.3867434-1-masahiroy@kernel.org> References: <20230722044806.3867434-1-masahiroy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Currently, we rely on the top Makefile defining ARCH option when we run 'make rpm-pkg' or 'make binrpm-pkg'. It does not apply when we run 'make srcrpm-pkg', and separately run 'rpmbuild' for the generated SRPM. This is a problem for cross-build. Just like the Debian package, save the value of ARCH in the spec file. Signed-off-by: Masahiro Yamada --- scripts/package/mkspec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/package/mkspec b/scripts/package/mkspec index a1ce6677880a..0befb4e2ac6b 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -38,8 +38,10 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \ # $S: this line is enabled only when building source package # $M: this line is enabled only when CONFIG_MODULES is enabled sed -e '/^DEL/d' -e 's/^\t*//' <