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: <bca228079ae6e3063465fdd78054910460426bb2.camel@physik.fu-berlin.de>
Date:   Tue, 04 Jul 2023 07:32:55 +0200
From:   John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
To:     Masahiro Yamada <masahiroy@...nel.org>,
        linux-kbuild@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Randy Dunlap <rdunlap@...radead.org>,
        Rich Felker <dalias@...c.org>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        linux-sh@...r.kernel.org
Subject: Re: [PATCH 4/4] sh: remove compiler flag duplication

On Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote:
> Every compiler flag added by arch/sh/Makefile is passed to the
> compiler twice.
> 
> $(KBUILD_CPPFLAGS) + $(KBUILD_CFLAGS) is used for compiling *.c
> $(KBUILD_CPPFLAGS) + $(KBUILD_AFLAGS) is used for compiling *.S
> 
> Given the above, adding $(cflags-y) to all of KBUILD_{CPP/C/A}FLAGS
> ends up with duplication.
> 
> Add -I options to $(KBUILD_CPPFLAGS), and the rest of $(cflags-y)
> to KBUILD_{C,A}FLAGS.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
> 
>  arch/sh/Makefile | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index f1c6aace8acb..cab2f9c011a8 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -145,10 +145,8 @@ cpuincdir-y			+= cpu-common	# Must be last
>  
>  drivers-y			+= arch/sh/drivers/
>  
> -cflags-y	+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
> -
> +KBUILD_CPPFLAGS		+= $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y))
>  KBUILD_CFLAGS		+= -pipe $(cflags-y)
> -KBUILD_CPPFLAGS		+= $(cflags-y)
>  KBUILD_AFLAGS		+= $(cflags-y)
>  
>  ifeq ($(CONFIG_MCOUNT),y)

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ