[Skiboot] [RFC PATCH 2/3] build: CFLAGS compile with -fpie and -fno-pic
Nicholas Piggin
npiggin at gmail.com
Tue Jul 18 20:40:07 AEST 2017
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 at gmail.com>
---
Makefile.main | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.main b/Makefile.main
index c421cbc6..b8fed59b 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -66,7 +66,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)
--
2.11.0
More information about the Skiboot
mailing list