lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Jun 2023 16:09:44 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     linux-kbuild@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Nicolas Schier <n.schier@....de>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>
Subject: Re: [PATCH v4 3/3] kbuild: respect GNU Make -w flag

On Tue, Jun 27, 2023 at 8:30 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> Currently, -w (--print-directory) option is ignored, but it is better
> to respect the user's choice.
>
> This commit changes the behavior of "Entering directory ..." logging.
>
> If -w (or --print-directory) is given via the command line or the
> MAKEFLAGS environment variable, print "Entering directory ..." for every
> sub make.
>
> If --no-print-directory is given via the command line or the MAKEFLAGS
> environment variable, suppress "Entering directory ..." completely.
>
> If none of them is given, print "Entering directory ..." when Kbuild
> changes the working directory at the start of building. (default)
>
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> Tested-by: Nicolas Schier <n.schier@....de>
> ---


As it turns out, this patch does not work for GNU Make <= 4.3

I will drop (and give up) this patch.






>
> (no changes since v2)
>
> Changes in v2:
>   - new patch
>
>  Makefile | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 7edb00603b7e..c9864f83a3d2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -38,6 +38,12 @@ __all:
>  # descending is started. They are now explicitly listed as the
>  # prepare rule.
>
> +ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> +short-opts := $(firstword -$(MAKEFLAGS))
> +else
> +short-opts := $(filter-out --%,$(MAKEFLAGS))
> +endif
> +
>  this-makefile := $(lastword $(MAKEFILE_LIST))
>  export abs_srctree := $(realpath $(dir $(this-makefile)))
>  export abs_objtree := $(CURDIR)
> @@ -95,12 +101,6 @@ endif
>  # commands
>  # make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
>
> -ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> -short-opts := $(firstword -$(MAKEFLAGS))
> -else
> -short-opts := $(filter-out --%,$(MAKEFLAGS))
> -endif
> -
>  ifneq ($(findstring s,$(short-opts)),)
>  quiet=silent_
>  override KBUILD_VERBOSE :=
> @@ -215,12 +215,16 @@ else
>  need-sub-make := 1
>  endif
>
> +ifeq ($(findstring w, $(short-opts)),)
>  ifeq ($(filter --no-print-directory, $(MAKEFLAGS)),)
>  # If --no-print-directory is unset, recurse once again to set it.
>  # You may end up recursing into __sub-make twice. This is needed due to the
>  # behavior change in GNU Make 4.4.1.
>  need-sub-make := 1
>  endif
> +else
> +no-print-directory :=
> +endif
>
>  ifeq ($(need-sub-make),1)
>
> --
> 2.39.2
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ