mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
x86, build: Disable -fPIE when compiling with CONFIG_CC_STACKPROTECTOR=y
The arch/x86/Makefile uses scripts/gcc-x86_$(BITS)-has-stack-protector.sh
to check if cc1 supports -fstack-protector. When -fPIE is passed to cc1,
these scripts fail causing stack protection to be disabled even when it
is available.
This fix is similar to commit c47efe5548
Reported-by: Kai Dietrich <[email protected]>
Signed-off-by: Magnus Granberg <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Anthony G. Basile <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
This commit is contained in:
parent
2fd818642a
commit
08c2b394b9
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ endif
|
|||
|
||||
ifdef CONFIG_CC_STACKPROTECTOR
|
||||
cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh
|
||||
ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(biarch)),y)
|
||||
ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(KBUILD_CPPFLAGS) $(biarch)),y)
|
||||
stackp-y := -fstack-protector
|
||||
KBUILD_CFLAGS += $(stackp-y)
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue