Skip to content
Commit cdb91f68 authored by Gavin Guo's avatar Gavin Guo Committed by Radim Krčmář
Browse files

Makefile: Disable PIE as GCC enables it by default from 6.2.0-7

Build fail can be observed while the kvm-unit-tests builds on Ubuntu
Yakkety/Zesty release:

/usr/bin/ld: x86/cstart64.o: relocation R_X86_64_32 against `.data'
can not be used when making a shared object; recompile with -fPIC

and can be fixed by adding "-fno-pic" and "-no-pie" option.

There are other discussions:
- gcc-6 6.2.0-7 breaks kernel build if stack protection is enabled
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841368
- [yakkety,RFC,v1] disable -pie when gcc has it enabled by default
https://patchwork.ozlabs.org/patch/616621/
- https://wiki.ubuntu.com/YakketyYak/ReleaseNotes#GCC



Signed-off-by: default avatarGavin Guo <gavin.guo@canonical.com>
Signed-off-by: default avatarHsiangkai Wang <hsiangkai@gmail.com>
Signed-off-by: default avatarCole Wang <cole945@gmail.com>
Tested-by: default avatarPo-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent 82f2f21a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment