From 50f36052abd708f394436fd8aa4c1176ca329503 Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Tue, 18 Jul 2017 20:40:07 +1000 Subject: 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 Signed-off-by: Stewart Smith --- Makefile.main | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.main') 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) -- cgit v1.1