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]
Message-ID: <CAK7LNATuG=RqghbmGrx99E95fFAbx9U8DUPp0XQtEO+fbBr-mA@mail.gmail.com>
Date:   Sat, 11 Mar 2017 22:34:50 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Wei Yang <richard.weiyang@...il.com>
Cc:     Michal Marek <mmarek@...e.com>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kbuild: strip the last slash in KBUILD_EXTMOD

Hi Wei,


2017-02-23 0:08 GMT+09:00 Wei Yang <richard.weiyang@...il.com>:
> Current kbuild will build the target again if we run "make M=dir" and "make
> M=dir/" by turns, since if_changed will see the prerequisite is changed.
> The behavior may confuse the user a little, since actually we are building
> the same target and no difference.
>
> According to current implementation in scripts/Makefile.build, the obj
> passed to next level is a directory name with last slash stripped. This
> patch strips the last slash in KBUILD_EXTMOD which is assigned from "M=".
>
> Signed-off-by: Wei Yang <richard.weiyang@...il.com>
> ---
>  Makefile | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index b1037774e8e8..db6ed60928ab 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -184,13 +184,15 @@ endif
>  # Old syntax make ... SUBDIRS=$PWD is still supported
>  # Setting the environment variable KBUILD_EXTMOD take precedence
>  ifdef SUBDIRS
> -  KBUILD_EXTMOD ?= $(SUBDIRS)
> +  __KBUILD_EXTMOD ?= $(SUBDIRS)
>  endif
>
>  ifeq ("$(origin M)", "command line")
> -  KBUILD_EXTMOD := $(M)
> +  __KBUILD_EXTMOD := $(M)
>  endif
>
> +KBUILD_EXTMOD = $(patsubst %/,%,$(__KBUILD_EXTMOD))
> +
>  # If building an external module we do not care about the all: rule
>  # but instead _all depend on modules
>  PHONY += all

This patch would break a use-case
where KBUILD_EXTMOD is given as an environment.



Maybe adding the following should be enough?

KBUILD_EXTMOD := $(patsubst %/,%,$(KBUILD_EXTMOD))


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ