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: <5d3f016c.1c69fb81.b4775.c7d0@mx.google.com>
Date:   Mon, 29 Jul 2019 07:23:39 -0700
From:   Stephen Boyd <swboyd@...omium.org>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     Michal Marek <michal.lkml@...kovi.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Peter Smith <peter.smith@...aro.org>,
        Nathan Chancellor <natechancellor@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Douglas Anderson <dianders@...omium.org>
Subject: Re: [PATCH v2] kbuild: Check for unknown options with cc-option usage in Kconfig and clang

Quoting Masahiro Yamada (2019-07-29 03:02:40)
> 
> Thanks for catching this.
> 
> I wonder if we could fix this issue
> by one-liner, like this:
> 
> 
> diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include
> index 8a5c4d645eb1..4bbf4fc163a2 100644
> --- a/scripts/Kconfig.include
> +++ b/scripts/Kconfig.include
> @@ -25,7 +25,7 @@ failure = $(if-success,$(1),n,y)
> 
>  # $(cc-option,<flag>)
>  # Return y if the compiler supports <flag>, n otherwise
> -cc-option = $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null)
> +cc-option = $(success,$(CC) -Werror $(CLANG_FLAGS) $(1) -E -x c
> /dev/null -o /dev/null)
> 
>  # $(ld-option,<flag>)
>  # Return y if the linker supports <flag>, n otherwise
> 
> 
> 
> This propagates not only -Werror=unknown-warning-option
> but also other clang flags to Kconfig.
> 
> 
> Currently, we do not pass the target triplet to Kconfig.
> This means, cc-option in Kconfig evaluates the given flags
> against host-arch instead of target-arch.
> The compiler flags are mostly independent of the architecture,
> and this is not a big deal, I think.
> But, maybe, would it make more sense to pass the other
> basic clang flags as well?
> 

Yes that also works and I had that earlier. I wanted to mirror what was
done in scripts/Kbuild.include where there's a CC_OPTION_CFLAGS
variable. I'm happy either way, so it's up to you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ