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] [day] [month] [year] [list]
Message-ID: <CAK7LNATtqFOOdG0niydTecrf2u9TZG7wFhM7Mq6jy0nOfhVwAg@mail.gmail.com>
Date: Tue, 16 Jan 2024 20:00:28 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Wei Yang <richard.weiyang@...il.com>
Cc: nathan@...nel.org, nicolas@...sle.eu, linux-kbuild@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Miguel Ojeda <ojeda@...nel.org>
Subject: Re: [PATCH] kbuild: take vmlinux.[ao] out of single-targets

On Mon, Jan 15, 2024 at 9:17 AM Wei Yang <richard.weiyang@...il.com> wrote:
>
> For current kernel, when we make vmlinux.a or vmlinux.o, following
> message would display.
>
> $make vmlinux.o
> /dir/to/kernel/Makefile:1887: warning: overriding recipe for target 'vmlinux.o'
> /dir/to/kernel/Makefile:1138: warning: ignoring old recipe for target 'vmlinux.o'
>   CALL    scripts/checksyscalls.sh
>   DESCEND objtool
>   INSTALL libsubcmd_headers
> make[2]: Nothing to be done for 'vmlinux.o'.
>
> The reason is vmlinux.[ao] is treated as single target, while the rule
> is written in root Makefile.
>
> This patch fixes this by take them out of single-targets.
>
> Signed-off-by: Wei Yang <richard.weiyang@...il.com>
> CC: Masahiro Yamada <masahiroy@...nel.org>
> CC: Miguel Ojeda <ojeda@...nel.org>
> CC: Nathan Chancellor <nathan@...nel.org>
> ---


Not all targets can be built by the single-target.

Just do not do "make vmlinux.o".









>  Makefile | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index f1b2fd977275..66fb08f6d971 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -280,6 +280,7 @@ no-dot-config-targets := $(clean-targets) \
>  no-sync-config-targets := $(no-dot-config-targets) %install modules_sign kernelrelease \
>                           image_name
>  single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.rsi %.s %.symtypes %/
> +no-single-targets := vmlinux.o vmlinux.a
>
>  config-build   :=
>  mixed-build    :=
> @@ -315,11 +316,14 @@ ifeq ($(KBUILD_EXTMOD),)
>  endif
>
>  # We cannot build single targets and the others at the same time
> -ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
> +ifneq ($(filter-out $(no-single-targets), $(filter $(single-targets), $(MAKECMDGOALS))),)
>         single-build := 1
>         ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
>                 mixed-build := 1
>         endif
> +       ifneq ($(filter $(no-single-targets), $(MAKECMDGOALS)),)
> +               mixed-build := 1
> +       endif
>  endif
>
>  # For "make -j clean all", "make -j mrproper defconfig all", etc.
> --
> 2.34.1
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ