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: <83744f82-8800-7c67-df58-e8925c8d50a3@cn.fujitsu.com>
Date:   Fri, 10 Nov 2017 18:58:26 +0800
From:   Cao jin <caoj.fnst@...fujitsu.com>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        <linux-kbuild@...r.kernel.org>
CC:     <linux-kernel@...r.kernel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Sam Ravnborg <sam@...nborg.org>,
        Douglas Anderson <dianders@...omium.org>,
        Michal Marek <mmarek@...e.com>
Subject: Re: [PATCH 4/4] kbuild: optimize object directory creation for
 incremental build

Masahiro-san

On 11/09/2017 11:41 PM, Masahiro Yamada wrote:
> The previous commit largely optimized the object directory creation.
> We can optimize it more for incremental build.
> 
> There are already *.cmd files in the output directory.  The existing
> *.cmd files have been picked up by $(wildcard ...).  Obviously,
> directories containing them exist too, so we can skip "mkdir -p".
> 
> With this, Kbuild runs almost zero "mkdir -p" in incremental building.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---
> 
>  scripts/Makefile.build | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 89ac180..90ea7a5 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -583,8 +583,13 @@ endif
>  ifneq ($(KBUILD_SRC),)
>  # Create directories for object files if directory does not exist
>  obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets))))
> +# If cmd_files exist, their directories apparently exist.  Skip mkdir.
> +exist-dirs := $(sort $(patsubst %/,%, $(dir $(cmd_files))))
> +obj-dirs := $(strip $(filter-out . $(exist-dirs), $(obj-dirs)))

First I am not sure if the dot "." here is necessary, because I guess
kbuild always descend into subdir do recursive make, so, very
$(cmd_files) should have at least 1 level dir.

Second, Assuming that "." probably exists, would it be "./"? because it
is what "dir" function returns.

-- 
Sincerely,
Cao jin

> +ifneq ($(obj-dirs),)
>  $(shell mkdir -p $(obj-dirs))
>  endif
> +endif
>  




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ