Bug 119381 - kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
Summary: kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
Status: NEW
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-31 20:19 UTC by Magnus Granberg
Modified: 2016-10-04 21:09 UTC (History)
0 users

See Also:
Kernel Version: 4.6.0
Tree: Mainline
Regression: No


Attachments
add only -fno-PIE (440 bytes, patch)
2016-05-31 20:19 UTC, Magnus Granberg
Details | Diff
check and disable -fPIE (934 bytes, patch)
2016-10-04 21:09 UTC, Magnus Granberg
Details | Diff

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.

Note You need to log in before you can comment on or make changes to this bug.