Skip to content

Commit

Permalink
kbuild: rpm-pkg: do not force -jN in submake
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
masahir0y committed Nov 14, 2017
1 parent af60e20 commit 8a16a07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ---------------------------------------------------------------------------
Expand Down

0 comments on commit 8a16a07

Please sign in to comment.