aboutsummaryrefslogtreecommitdiff
path: root/Makefile.main
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-07-18 20:40:07 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-08-22 16:23:12 +1000
commit50f36052abd708f394436fd8aa4c1176ca329503 (patch)
treeaeeb301593fd44bcc0aec44fdd4368455e212a72 /Makefile.main
parent705d2f190cfd6f2cf6e4d91efc1ca71edfbe18da (diff)
downloadskiboot-50f36052abd708f394436fd8aa4c1176ca329503.zip
skiboot-50f36052abd708f394436fd8aa4c1176ca329503.tar.gz
skiboot-50f36052abd708f394436fd8aa4c1176ca329503.tar.bz2
build: CFLAGS compile with -fpie and -fno-pic
When gcc is configured with --enabled-default-pie, sets -fpic which does not need to be enabled, so remove it. Pass -fpie explicitly as well just to be careful. This was observed with the powerpc64le cross compiler for Debian. This allows the powerpc64le toolchain to compile an almost identical binary as the powerpc64 toolchain. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile.main')
-rw-r--r--Makefile.main2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.main b/Makefile.main
index 20a8749..a7bb8be 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -65,7 +65,7 @@ ifeq ($(DEBUG),1)
CPPFLAGS += -DDEBUG -DCCAN_LIST_DEBUG
endif
-CFLAGS := -fno-strict-aliasing -pie -mbig-endian -m64
+CFLAGS := -fno-strict-aliasing -pie -fpie -fno-pic -mbig-endian -m64
CFLAGS += -Wl,--oformat,elf64-powerpc
CFLAGS += -ffixed-r13
CFLAGS += $(call try-cflag,$(CC),-std=gnu11)