Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 584014 | Differences between
and this patch

Collapse All | Expand All

(-)a/scripts/gcc-x86_64-has-stack-protector.sh (-3 / +1 lines)
Lines 1-6 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
2
3
echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
3
echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
4
if [ "$?" -eq "0" ] ; then
4
if [ "$?" -eq "0" ] ; then
5
	echo y
5
	echo y
6
else
6
else
7
- 
8
--
9
arch/x86/purgatory/Makefile | 1 +
7
arch/x86/purgatory/Makefile | 1 +
10
1 file changed, 1 insertion(+)
8
1 file changed, 1 insertion(+)
(-)a/arch/x86/purgatory/Makefile (-3 / +1 lines)
Lines 16-21 KCOV_INSTRUMENT := n Link Here
16
16
17
KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large
17
KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large
18
KBUILD_CFLAGS += -m$(BITS)
18
KBUILD_CFLAGS += -m$(BITS)
19
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
19
20
20
$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
21
$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
21
		$(call if_changed,ld)
22
		$(call if_changed,ld)
22
- 
23
 Kbuild.include already uses KBUILD_CFLAGS and trying to disable gcc
24
 gcc -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
23
 gcc -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
25
 ...
24
 ...
26
 -Wno-sign-compare -fno-asynchronous-unwind-tables -Wframe-address -c -x c /dev/null -o .31392.tmp
25
 -Wno-sign-compare -fno-asynchronous-unwind-tables -Wframe-address -c -x c /dev/null -o .31392.tmp
27
 /dev/null:1:0: error: code model kernel does not support PIC mode
26
 /dev/null:1:0: error: code model kernel does not support PIC mode
28
--
29
Makefile | 7 +++----
27
Makefile | 7 +++----
30
1 file changed, 3 insertions(+), 4 deletions(-)
28
1 file changed, 3 insertions(+), 4 deletions(-)
(-)a/Makefile (-3 / +3 lines)
Lines 399-409 KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ Link Here
399
		   -fno-strict-aliasing -fno-common \
399
		   -fno-strict-aliasing -fno-common \
400
		   -Werror-implicit-function-declaration \
400
		   -Werror-implicit-function-declaration \
401
		   -Wno-format-security \
401
		   -Wno-format-security \
402
		   -std=gnu89
402
		   -std=gnu89 $(call cc-option,-fno-PIE)
403
403
404
404
KBUILD_AFLAGS_KERNEL :=
405
KBUILD_AFLAGS_KERNEL :=
405
KBUILD_CFLAGS_KERNEL :=
406
KBUILD_CFLAGS_KERNEL :=
406
KBUILD_AFLAGS   := -D__ASSEMBLY__
407
KBUILD_AFLAGS   := -D__ASSEMBLY__ $(call cc-option,-fno-PIE)
407
KBUILD_AFLAGS_MODULE  := -DMODULE
408
KBUILD_AFLAGS_MODULE  := -DMODULE
408
KBUILD_CFLAGS_MODULE  := -DMODULE
409
KBUILD_CFLAGS_MODULE  := -DMODULE
409
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
410
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
410
- 

Return to bug 584014