From patchwork Sat Sep 30 01:10:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 9978945 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B72ED60311 for ; Sat, 30 Sep 2017 01:11:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA43D2989F for ; Sat, 30 Sep 2017 01:11:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F210298CE; Sat, 30 Sep 2017 01:11:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89E952989F for ; Sat, 30 Sep 2017 01:11:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752622AbdI3BLM (ORCPT ); Fri, 29 Sep 2017 21:11:12 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:25317 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752728AbdI3BKf (ORCPT ); Fri, 29 Sep 2017 21:10:35 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOKD030198; Sat, 30 Sep 2017 10:10:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOKD030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733829; bh=yeqfK9atw9ppP3MCck1LaG1V9BfMdKw5A6KonPSwlIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iYcq5GmgUmvh8WWU3ac3n6Cj2udUFaVDWrbxlxn+yXwZ+LhUZKZWIHhjegFd67ARF IA9ZbJG1uv+LWbVOKWcyLMIHm7J2jIj6ZWErM6bPcOGFfjc49clOKOLnickGk+itYw 2LR6IP2Nl7AF2tmUCUVy9tQuUHq66gbKN/K6XIHqqoTVDGAbEaG2t9cC126J7yOKRm zEaUukGjeK8hSThmJbg/cqrbiATi++Q/dzW1TZY8MRL0jl8nu5eJxFNu9pNIJLgWtg tc/AZgGFZGY/Rhn/Lkjue23augDQhId4JFkiEfXlNPd0wMXpTRz6qfVwI2RXLssS1r SpuGczxco0tAw== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 9/9] kbuild: rpm-pkg: do not force -jN in submake Date: Sat, 30 Sep 2017 10:10:11 +0900 Message-Id: <1506733811-24636-9-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> References: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The spec file always passes %{?_smp_mflags}, but we have two problems here. [1] "make -jN rpm-pkg" emits the following warning message: make[2]: warning: -jN forced in submake: disabling jobserver mode. [2] We can not specify the number of jobs that run in parallel. Whether we give -jN or not from the top Makefile, the spec file always passes ${?_smp_mflags} to the build commands. ${?_smp_mflags} will be useful when we run rpmbuild by hand. When we invoke it from Makefile, -jN is propagated down to submake; it should not be overridden because we want to respect the number of jobs given by the user. Set _smp_mflags to empty string in this case. Signed-off-by: Masahiro Yamada --- scripts/package/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 70eea1e..9ed96aef 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -50,7 +50,8 @@ rpm-pkg rpm: FORCE $(MAKE) clean $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec $(call cmd,src_tar,$(KERNELPATH),kernel.spec) - +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz + +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz \ + --define='_smp_mflags %{nil}' # binrpm-pkg # ---------------------------------------------------------------------------