]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
Correct the Makefile logic for disabling PIE
authorSteve Capper <steve.capper@arm.com>
Tue, 23 Jan 2018 03:30:05 +0000 (03:30 +0000)
committerSteve Capper <steve.capper@arm.com>
Tue, 23 Jan 2018 03:42:49 +0000 (03:42 +0000)
In the Makefile we use findstring to locate gcc toolchains
that have PIE enabled by default.

Unfortunately the result of findstring is compared against
an integer, 1, rather than a non-empty string; the logic to
disable PIE then doesn't get applied.

This patch fixes the flag test.

Fixes: f7ec31db2db3 ("Disable PIE compilation option")
Change-Id: I4cd2866974e313d6b408f9681311d78a208ab468
Signed-off-by: Steve Capper <steve.capper@arm.com>
Makefile

index 1cd6b62cbba5aeb604ec3090735305beee384bac..9600455ebc8877daac32b317bb8eacd873bcfba6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -163,7 +163,7 @@ TF_CFLAGS           +=      $(CPPFLAGS) $(TF_CFLAGS_$(ARCH))                \
 GCC_V_OUTPUT           :=      $(shell $(CC) -v 2>&1)
 PIE_FOUND              :=      $(findstring --enable-default-pie,${GCC_V_OUTPUT})
 
-ifeq ($(PIE_FOUND),1)
+ifneq ($(PIE_FOUND),)
 TF_CFLAGS              +=      -fno-PIE
 endif