Merge pull request #1195 from davidcunado-arm/dc/fix_pie

Disable PIE compilation option
This commit is contained in:
davidcunado-arm 2017-12-19 20:41:53 +00:00 committed by GitHub
commit 9f36f4c4e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -160,6 +160,13 @@ TF_CFLAGS += $(CPPFLAGS) $(TF_CFLAGS_$(ARCH)) \
-ffreestanding -fno-builtin -Wall -std=gnu99 \
-Os -ffunction-sections -fdata-sections
GCC_V_OUTPUT := $(shell $(CC) -v 2>&1)
PIE_FOUND := $(findstring --enable-default-pie,${GCC_V_OUTPUT})
ifeq ($(PIE_FOUND),1)
TF_CFLAGS += -fno-PIE
endif
TF_LDFLAGS += --fatal-warnings -O1
TF_LDFLAGS += --gc-sections
TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH))