# git rev-parse -q --verify 5fc10e76fa2a96d0207ed4d0cc9d16fb61371f71^{commit} 5fc10e76fa2a96d0207ed4d0cc9d16fb61371f71 already have revision, skipping fetch # git checkout -q -f -B kisskb 5fc10e76fa2a96d0207ed4d0cc9d16fb61371f71 # git clean -qxdf # < git log -1 # commit 5fc10e76fa2a96d0207ed4d0cc9d16fb61371f71 # Author: Masahiro Yamada # Date: Tue Jun 27 08:30:13 2023 +0900 # # kbuild: revive "Entering directory" for Make >= 4.4.1 # # With commit 9da0763bdd82 ("kbuild: Use relative path when building in # a subdir of the source tree"), compiler messages in out-of-tree builds # include relative paths, which are relative to the build directory, not # the directory where make was started. # # To help IDEs/editors find the source files, Kbuild lets GNU Make print # "Entering directory ..." when it changes the working directory. It has # been working fine for a long time, but David reported it is broken with # the latest GNU Make. # # The behavior was changed by GNU Make commit 8f9e7722ff0f ("[SV 63537] # Fix setting -w in makefiles"). Previously, setting --no-print-directory # to MAKEFLAGS only affected child makes, but it is now interpreted in # the current make as soon as it is set. # # [test code] # # $ cat /tmp/Makefile # ifneq ($(SUBMAKE),1) # MAKEFLAGS += --no-print-directory # all: ; $(MAKE) SUBMAKE=1 # else # all: ; : # endif # # [before 8f9e7722ff0f] # # $ make -C /tmp # make: Entering directory '/tmp' # make SUBMAKE=1 # : # make: Leaving directory '/tmp' # # [after 8f9e7722ff0f] # # $ make -C /tmp # make SUBMAKE=1 # : # # Previously, the effect of --no-print-directory was delayed until Kbuild # started the directory descending, but it is no longer true with GNU Make # 4.4.1. # # This commit adds one more recursion to cater to GNU Make >= 4.4.1. # # When Kbuild needs to change the working directory, __submake will be # executed twice. # # __submake without --no-print-directory --> show "Entering directory ..." # __submake with --no-print-directory --> parse the rest of Makefile # # We end up with one more recursion than needed for GNU Make < 4.4.1, but # I do not want to complicate the version check. # # Reported-by: David Howells # Closes: https://lore.kernel.org/all/2427604.1686237298@warthog.procyon.org.uk/ # Signed-off-by: Masahiro Yamada # Tested-by: Nicolas Schier # < /opt/cross/kisskb/korg/gcc-11.3.0-nolibc/m68k-linux/bin/m68k-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.3.0-nolibc/m68k-linux/bin/m68k-linux-ld --version # < git log --format=%s --max-count=1 5fc10e76fa2a96d0207ed4d0cc9d16fb61371f71 # make -s -j 40 ARCH=m68k O=/kisskb/build/kbuild_defconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.3.0-nolibc/m68k-linux/bin/m68k-linux- defconfig # < make -s -j 40 ARCH=m68k O=/kisskb/build/kbuild_defconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.3.0-nolibc/m68k-linux/bin/m68k-linux- help # make -s -j 40 ARCH=m68k O=/kisskb/build/kbuild_defconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.3.0-nolibc/m68k-linux/bin/m68k-linux- olddefconfig # make -s -j 40 ARCH=m68k O=/kisskb/build/kbuild_defconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.3.0-nolibc/m68k-linux/bin/m68k-linux- Completed OK # rm -rf /kisskb/build/kbuild_defconfig_m68k-gcc11 # Build took: 0:01:04.851423