lkml.org 
[lkml]   [2021]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] kbuild: fix duplicated flags in DEBUG_CFLAGS
From
Date
Hi Masahiro,

On Wed, 2021-02-03 at 16:52 +0900, Masahiro Yamada wrote:
> With commit 121c5d08d53c ("kbuild: Only add -fno-var-tracking-
> assignments
> for old GCC versions") applied, DEBUG_CFLAGS is now reset only when
> CONFIG_CC_IS_GCC=y.
>
> Fix it to reset DEBUG_CFLAGS also when using Clang.
>
> [...]
> +DEBUG_CFLAGS :=
> +
> # Workaround for GCC versions < 5.0
> # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801
> ifdef CONFIG_CC_IS_GCC
> -DEBUG_CFLAGS := $(call cc-ifversion, -lt, 0500, $(call cc-option, -fno-var-tracking-assignments))
> +DEBUG_CFLAGS += $(call cc-ifversion, -lt, 0500, $(call cc-option, -fno-var-tracking-assignments))
> endif

Yes, this makes sense given that the original code, before commit
121c5d08d53c did always set DEBUG_CFLAGS without checking for
CONFIG_CC_IS_GCC. So it behaved like the above code does.

Reviewed-by: Mark Wielaard <mark@klomp.org>

Thanks,

Mark

\
 
 \ /
  Last update: 2021-02-03 11:39    [W:0.075 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site