summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-12-14 03:05:37 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-12-16 10:33:44 -0500
commit42a92bccd213ce4b7198d2e943ac0efe88cbe1aa (patch)
tree8e9a8f0d8751d4406ab0c57fb2ee1ab50963ee1e /Makefile
parent518d8a5644197abd3d5efb23c71afff25194da7e (diff)
kbuild: add -fno-PIE flag unconditionally
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> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 2 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 6f3df2d786dd..2d15726fb546 100644
--- a/Makefile
+++ b/Makefile
@@ -426,9 +426,9 @@ LINUXINCLUDE := \
426 -I$(objtree)/include \ 426 -I$(objtree)/include \
427 $(USERINCLUDE) 427 $(USERINCLUDE)
428 428
429KBUILD_AFLAGS := -D__ASSEMBLY__ 429KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
430KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 430KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
431 -fno-strict-aliasing -fno-common -fshort-wchar \ 431 -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
432 -Werror-implicit-function-declaration \ 432 -Werror-implicit-function-declaration \
433 -Wno-format-security \ 433 -Wno-format-security \
434 -std=gnu89 434 -std=gnu89
@@ -514,9 +514,6 @@ RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc
514export RETPOLINE_CFLAGS 514export RETPOLINE_CFLAGS
515export RETPOLINE_VDSO_CFLAGS 515export RETPOLINE_VDSO_CFLAGS
516 516
517KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
518KBUILD_AFLAGS += $(call cc-option,-fno-PIE)
519
520# check for 'asm goto' 517# check for 'asm goto'
521ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y) 518ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y)
522 CC_HAVE_ASM_GOTO := 1 519 CC_HAVE_ASM_GOTO := 1