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: <20240418134337.GA1174228-robh@kernel.org>
Date: Thu, 18 Apr 2024 08:43:37 -0500
From: Rob Herring <robh@...nel.org>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] kbuild: use $(src) instead of $(srctree)/$(src) for
 source directory

On Tue, Apr 16, 2024 at 09:18:38PM +0900, Masahiro Yamada wrote:
> Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for
> checked-in source files. It is merely a convention without any functional
> difference. In fact, $(obj) and $(src) are exactly the same, as defined
> in scripts/Makefile.build:
> 
>     src := $(obj)
> 
> When the kernel is built in a separate output directory, $(src) does
> not match the directory in the source tree. It still works because the
> top Makefile sets VPATH to $(srctree). However, VPATH does not cover
> all cases. There are many places where the exact path to the source
> directory is needed. For example, when adding a header search path for
> local headers, it is typical to pass -I$(srctree)/$(src) to the compiler.
> 
> However, it introduces inconsistency between upstream Makefiles and
> downstream Makefiles; when the source directory path is needed,
> $(srctree)/$(src) is used in the upstream kernel, while $(src) is used
> in external modules.
> 
> To resolve the distortion, this commit changes the semantics of $(src)
> so that it always points to the directory in the source tree.
> 
> Going forward, the variables used in Makefiles will work as follows:
> 
>   $(obj)     - directory in the object tree
>   $(src)     - directory in the source tree  (changed by this commit!)
>   $(objtree) - the top of the kernel object tree
>   $(srctree) - the top of the kernel source tree
> 
> This is a tweewide Makefile conversion for replacing $(srctree)/$(src)
> with $(src).
> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
> 
>  Documentation/Makefile                             |  8 ++++----
>  Documentation/devicetree/bindings/Makefile         | 10 +++++-----

Acked-by: Rob Herring (Arm) <robh@...nel.org>

However, this is going to conflict with my series here[1]. Can you pick 
it up?

Rob

[1] https://lore.kernel.org/all/20240405-dt-kbuild-rework-v2-0-3a035caee357@kernel.org/


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ