Skip to content

Commit 8a16a07

Browse files
committed
kbuild: rpm-pkg: do not force -jN in submake
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 <yamada.masahiro@socionext.com>
1 parent af60e20 commit 8a16a07

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎scripts/package/Makefile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ rpm-pkg rpm: FORCE
5050
$(MAKE) clean
5151
$(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
5252
$(call cmd,src_tar,$(KERNELPATH),kernel.spec)
53-
+rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
53+
+rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz \
54+
--define='_smp_mflags %{nil}'
5455

5556
# binrpm-pkg
5657
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)