linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] kbuild: add -fno-PIE flag unconditionally
@ 2018-12-14  8:05 Masahiro Yamada
  2018-12-14  8:05 ` [PATCH 2/3] kbuild: add -Werror=strict-prototype " Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Masahiro Yamada @ 2018-12-14  8:05 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Nick Desaulniers, Masahiro Yamada, Michal Marek, linux-kernel

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 | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index f2c3423..3bbc16a 100644
--- a/Makefile
+++ b/Makefile
@@ -422,9 +422,9 @@ LINUXINCLUDE    := \
 		-I$(objtree)/include \
 		$(USERINCLUDE)
 
-KBUILD_AFLAGS   := -D__ASSEMBLY__
+KBUILD_AFLAGS   := -D__ASSEMBLY__ -fno-PIE
 KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-		   -fno-strict-aliasing -fno-common -fshort-wchar \
+		   -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
 		   -Werror-implicit-function-declaration \
 		   -Wno-format-security \
 		   -std=gnu89
@@ -510,9 +510,6 @@ RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc
 export RETPOLINE_CFLAGS
 export RETPOLINE_VDSO_CFLAGS
 
-KBUILD_CFLAGS	+= $(call cc-option,-fno-PIE)
-KBUILD_AFLAGS	+= $(call cc-option,-fno-PIE)
-
 # check for 'asm goto'
 ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y)
   CC_HAVE_ASM_GOTO := 1
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-16 15:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14  8:05 [PATCH 1/3] kbuild: add -fno-PIE flag unconditionally Masahiro Yamada
2018-12-14  8:05 ` [PATCH 2/3] kbuild: add -Werror=strict-prototype " Masahiro Yamada
2018-12-14 18:33   ` Nick Desaulniers
2018-12-16 15:31     ` Masahiro Yamada
2018-12-14  8:05 ` [PATCH 3/3] kbuild: add -Werror=implicit-int " Masahiro Yamada
2018-12-14 18:26   ` Nick Desaulniers
2018-12-14 18:29 ` [PATCH 1/3] kbuild: add -fno-PIE " Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).