From: Nicolas Schier <nicolas@fjasle.eu>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@linux-foundation.org, masahiroy@kernel.org,
nathan@kernel.org, ndesaulniers@google.com,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] kbuild: flatten KBUILD_CFLAGS
Date: Fri, 14 Jul 2023 12:42:11 +0200 [thread overview]
Message-ID: <ZLEmgxm73zzmffWD@fjasle.eu> (raw)
In-Reply-To: <4f414a87-0c54-44bd-b218-f6f0b22c57ef@p183>
[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]
On Thu, Jul 13, 2023 at 09:52:28PM +0300, Alexey Dobriyan wrote:
> Make it slightly easier to see which compiler options are added and
> removed (and not worry about column limit too!).
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
>
> Makefile | 22 +++++++++++++++++-----
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
> --- a/Makefile
> +++ b/Makefile
> @@ -555,11 +555,23 @@ LINUXINCLUDE := \
> $(USERINCLUDE)
>
> KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
> -KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
> - -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
> - -Werror=implicit-function-declaration -Werror=implicit-int \
> - -Werror=return-type -Wno-format-security -funsigned-char \
> - -std=gnu11
> +
> +KBUILD_CFLAGS :=
> +KBUILD_CFLAGS += -std=gnu11
If you want to put -std at top, on contrast to the sorted options below,
you could also merge the two lines above.
> +KBUILD_CFLAGS += -fshort-wchar
> +KBUILD_CFLAGS += -funsigned-char
> +KBUILD_CFLAGS += -fno-common
> +KBUILD_CFLAGS += -fno-PIE
> +KBUILD_CFLAGS += -fno-strict-aliasing
> +KBUILD_CFLAGS += -Wall
> +KBUILD_CFLAGS += -Wundef
> +KBUILD_CFLAGS += -Werror=implicit-function-declaration
> +KBUILD_CFLAGS += -Werror=implicit-int
> +KBUILD_CFLAGS += -Werror=return-type
> +KBUILD_CFLAGS += -Werror=strict-prototypes
> +KBUILD_CFLAGS += -Wno-format-security
> +KBUILD_CFLAGS += -Wno-trigraphs
> +
> KBUILD_CPPFLAGS := -D__KERNEL__
> KBUILD_RUSTFLAGS := $(rust_common_flags) \
> --target=$(objtree)/scripts/target.json \
Thanks for the patch.
Reviewed-by: Nicolas Schier <n.schier@avm.de>
--
epost|xmpp: nicolas@fjasle.eu irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb c82b 7d97 0932 55a0 ce7f
-- frykten for herren er opphav til kunnskap --
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-07-14 10:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 18:52 [PATCH] kbuild: flatten KBUILD_CFLAGS Alexey Dobriyan
2023-07-14 10:42 ` Nicolas Schier [this message]
2023-07-14 17:45 ` Alexey Dobriyan
2023-07-14 19:30 ` Nicolas Schier
2023-07-15 6:36 ` Masahiro Yamada
2023-07-21 14:27 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZLEmgxm73zzmffWD@fjasle.eu \
--to=nicolas@fjasle.eu \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox