Message ID | 1544774739-13471-3-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | Accepted |
Commit | 61a0902a06d602377cb6526deacfe4f0a7eade73 |
Headers | show |
Series | [1/3] kbuild: add -fno-PIE flag unconditionally | expand |
On Fri, Dec 14, 2018 at 12:06 AM Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > > This flag is documented in the GCC 4.6 manual, and recognized by > Clang as well. Let's rip off the cc-option switch. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> LGTM: https://godbolt.org/z/1Z3aG2 Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> > --- > > Makefile | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/Makefile b/Makefile > index bcb943e..b63699b 100644 > --- a/Makefile > +++ b/Makefile > @@ -425,7 +425,7 @@ LINUXINCLUDE := \ > 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-function-declaration -Werror=implicit-int \ > -Wno-format-security \ > -std=gnu89 > KBUILD_CPPFLAGS := -D__KERNEL__ > @@ -825,9 +825,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,) > # conserve stack if available > KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) > > -# disallow errors like 'EXPORT_GPL(foo);' with missing header > -KBUILD_CFLAGS += $(call cc-option,-Werror=implicit-int) > - > # Prohibit date/time macros, which would make the build non-deterministic > KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) > > -- > 2.7.4 > -- Thanks, ~Nick Desaulniers
diff --git a/Makefile b/Makefile index bcb943e..b63699b 100644 --- a/Makefile +++ b/Makefile @@ -425,7 +425,7 @@ LINUXINCLUDE := \ 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-function-declaration -Werror=implicit-int \ -Wno-format-security \ -std=gnu89 KBUILD_CPPFLAGS := -D__KERNEL__ @@ -825,9 +825,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,) # conserve stack if available KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) -# disallow errors like 'EXPORT_GPL(foo);' with missing header -KBUILD_CFLAGS += $(call cc-option,-Werror=implicit-int) - # Prohibit date/time macros, which would make the build non-deterministic KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
This flag is documented in the GCC 4.6 manual, and recognized by Clang as well. Let's rip off the cc-option switch. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.7.4