Patch "tools: fix annoying "mkdir -p ..." logs when building tools in parallel" has been added to the 6.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tools: fix annoying "mkdir -p ..." logs when building tools in parallel

to the 6.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tools-fix-annoying-mkdir-p-.-logs-when-building-tool.patch
and it can be found in the queue-6.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b75df12a0cbadd238e9da5f736f1c3d639fed38b
Author: Masahiro Yamada <masahiroy@xxxxxxxxxx>
Date:   Tue Feb 11 09:29:06 2025 +0900

    tools: fix annoying "mkdir -p ..." logs when building tools in parallel
    
    [ Upstream commit d1d0963121769d8d16150b913fe886e48efefa51 ]
    
    When CONFIG_OBJTOOL=y or CONFIG_DEBUG_INFO_BTF=y, parallel builds
    show awkward "mkdir -p ..." logs.
    
      $ make -j16
        [ snip ]
      mkdir -p /home/masahiro/ref/linux/tools/objtool && make O=/home/masahiro/ref/linux subdir=tools/objtool --no-print-directory -C objtool
      mkdir -p /home/masahiro/ref/linux/tools/bpf/resolve_btfids && make O=/home/masahiro/ref/linux subdir=tools/bpf/resolve_btfids --no-print-directory -C bpf/resolve_btfids
    
    Defining MAKEFLAGS=<value> on the command line wipes out command line
    switches from the resultant MAKEFLAGS definition, even though the command
    line switches are active. [1]
    
    MAKEFLAGS puts all single-letter options into the first word, and that
    word will be empty if no single-letter options were given. [2]
    However, this breaks if MAKEFLAGS=<value> is given on the command line.
    
    The tools/ and tools/% targets set MAKEFLAGS=<value> on the command
    line, which breaks the following code in tools/scripts/Makefile.include:
    
        short-opts := $(firstword -$(MAKEFLAGS))
    
    If MAKEFLAGS really needs modification, it should be done through the
    environment variable, as follows:
    
        MAKEFLAGS=<value> $(MAKE) ...
    
    That said, I question whether modifying MAKEFLAGS is necessary here.
    The only flag we might want to exclude is --no-print-directory, as the
    tools build system changes the working directory. However, people might
    find the "Entering/Leaving directory" logs annoying.
    
    I simply removed the offending MAKEFLAGS=<value>.
    
    [1]: https://savannah.gnu.org/bugs/?62469
    [2]: https://www.gnu.org/software/make/manual/make.html#Testing-Flags
    
    Fixes: ea01fa9f63ae ("tools: Connect to the kernel build system")
    Fixes: a50e43332756 ("perf tools: Honor parallel jobs")
    Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
    Tested-by: Daniel Xu <dxu@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/Makefile b/Makefile
index 423d087afad2d..5a6d2646b1e55 100644
--- a/Makefile
+++ b/Makefile
@@ -1416,18 +1416,13 @@ ifneq ($(wildcard $(resolve_btfids_O)),)
 	$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
 endif
 
-# Clear a bunch of variables before executing the submake
-ifeq ($(quiet),silent_)
-tools_silent=s
-endif
-
 tools/: FORCE
 	$(Q)mkdir -p $(objtree)/tools
-	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
+	$(Q)$(MAKE) LDFLAGS= O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
 
 tools/%: FORCE
 	$(Q)mkdir -p $(objtree)/tools
-	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
+	$(Q)$(MAKE) LDFLAGS= O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
 
 # ---------------------------------------------------------------------------
 # Kernel selftest




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux