Bug 119381

Summary: kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
Product: Other Reporter: Magnus Granberg (zorry)
Component: OtherAssignee: other_other
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.6.0 Subsystem:
Regression: No Bisected commit-id:
Attachments: add only -fno-PIE
check and disable -fPIE

Description Magnus Granberg 2016-05-31 20:19:35 UTC
Created attachment 218461 [details]
add only -fno-PIE

When gcc 6.1 is configured with --enable-default-pie
the kernel fail to compile with a error.
HOSTCC  arch/x86/tools/relocs_common.o
HOSTLD  arch/x86/tools/relocs
CHK     include/generated/timeconst.h
CC      kernel/bounds.s
UPD     include/generated/timeconst.h
kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
Kbuild:44: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:1005: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
Comment 1 Magnus Granberg 2016-10-04 21:09:52 UTC
Created attachment 240691 [details]
check and disable -fPIE

This check if the compiler default to -fPIE and add -fno-PIE were is needed.