Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 454150 Details for
Bug 584014
sys-kernel/gentoo-sources-4.6.0: building w/gcc-6[pie]: kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.8
kernel-fno-pie.patch (text/plain), 3.81 KB, created by
Mike Pagano
on 2016-11-23 20:16:49 UTC
(
hide
)
Description:
Patch for 4.8
Filename:
MIME Type:
Creator:
Mike Pagano
Created:
2016-11-23 20:16:49 UTC
Size:
3.81 KB
patch
obsolete
>--- a/Makefile 2016-11-23 15:03:33.153194812 -0500 >+++ b/Makefile 2016-11-23 15:04:11.433367357 -0500 >@@ -621,6 +621,8 @@ include arch/$(SRCARCH)/Makefile > > KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) > KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) >+KBUILD_CFLAGS += $(call cc-option,-fno-PIE) >+KBUILD_AFLAGS += $(call cc-option,-fno-PIE) > > ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE > KBUILD_CFLAGS += -Os >From 90944e40ba1838de4b2a9290cf273f9d76bd3bdd Mon Sep 17 00:00:00 2001 >From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> >Date: Fri, 4 Nov 2016 19:39:40 +0100 >Subject: x86/kexec: add -fno-PIE > >From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > >commit 90944e40ba1838de4b2a9290cf273f9d76bd3bdd upstream. > >If the gcc is configured to do -fPIE by default then the build aborts >later with: >| Unsupported relocation type: unknown type rel type name (29) > >Tagging it stable so it is possible to compile recent stable kernels as >well. > >Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> >Signed-off-by: Michal Marek <mmarek@suse.com> >Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > >--- > arch/x86/purgatory/Makefile | 1 + > 1 file changed, 1 insertion(+) > >--- a/arch/x86/purgatory/Makefile >+++ b/arch/x86/purgatory/Makefile >@@ -16,6 +16,7 @@ KCOV_INSTRUMENT := n > > KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large > KBUILD_CFLAGS += -m$(BITS) >+KBUILD_CFLAGS += $(call cc-option,-fno-PIE) > > $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE > $(call if_changed,ld) >--- a/Makefile 2016-11-23 15:11:30.365405792 -0500 >+++ b/Makefile 2016-11-23 15:11:48.135488944 -0500 >@@ -403,7 +403,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstric > > KBUILD_AFLAGS_KERNEL := > KBUILD_CFLAGS_KERNEL := >-KBUILD_AFLAGS := -D__ASSEMBLY__ >+KBUILD_AFLAGS := -D__ASSEMBLY__ $(call cc-option,-fno-PIE) > KBUILD_AFLAGS_MODULE := -DMODULE > KBUILD_CFLAGS_MODULE := -DMODULE > KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds >@@ -621,8 +621,6 @@ include arch/$(SRCARCH)/Makefile > > KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) > KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) >-KBUILD_CFLAGS += $(call cc-option,-fno-PIE) >-KBUILD_AFLAGS += $(call cc-option,-fno-PIE) > > ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE > KBUILD_CFLAGS += -Os >From 82031ea29e454b574bc6f49a33683a693ca5d907 Mon Sep 17 00:00:00 2001 >From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> >Date: Fri, 4 Nov 2016 19:39:39 +0100 >Subject: scripts/has-stack-protector: add -fno-PIE > >From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > >commit 82031ea29e454b574bc6f49a33683a693ca5d907 upstream. > >Adding -no-PIE to the fstack protector check. -no-PIE was introduced >before -fstack-protector so there is no need for a runtime check. > >Without it the build stops: >|Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong available but compiler is broken > >due to -mcmodel=kernel + -fPIE if -fPIE is enabled by default. > >Tagging it stable so it is possible to compile recent stable kernels as >well. > >Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> >Signed-off-by: Michal Marek <mmarek@suse.com> >Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > >--- > scripts/gcc-x86_64-has-stack-protector.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >--- a/scripts/gcc-x86_64-has-stack-protector.sh >+++ b/scripts/gcc-x86_64-has-stack-protector.sh >@@ -1,6 +1,6 @@ > #!/bin/sh > >-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" >+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" > if [ "$?" -eq "0" ] ; then > echo y > else
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 584014
:
435292
|
435394
|
449158
|
450174
|
453568
| 454150