summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand SIMONNET <bsimonnet@chromium.org>2014-06-30 09:41:13 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-07 19:22:21 +0000
commitf8f807a5ef00e8d5360fc2c9093bd0b5da8c0507 (patch)
treee5dc4427def1098455e2a15cc4feb7f9074b8ed5
parent9e1da784487fb8cfbe4e76693e07205b66675bda (diff)
downloadvboot-f8f807a5ef00e8d5360fc2c9093bd0b5da8c0507.tar.gz
Add fPIE flag
libvboot_host.a is needed by metrics, compiled in platform's gyp/ninja system. All platform executables need to be position independent so we need libvboot_host.a to be position independent too. BRANCH=None BUG=chromium:389742 TEST=Unittests. TEST=Build vboot_reference and metrics, metrics compiles. TEST=Build coreboot on a rambi, the compilation succeeds. TEST=trybot run on daisy, link, duck, rambi and x86-mario. Change-Id: I4b761d9435c35e3d3fcae2efc72fcaed7fc746a6 Reviewed-on: https://chromium-review.googlesource.com/206055 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: Bertrand Simonnet <bsimonnet@chromium.org> Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 60509f67..2fb59cc8 100644
--- a/Makefile
+++ b/Makefile
@@ -162,6 +162,11 @@ endif
# Create / use dependency files
CFLAGS += -MMD -MF $@.d
+ifeq (${FIRMWARE_ARCH},)
+# Creates position independent code for non firmware target.
+CFLAGS += -fPIE
+endif
+
# These are required to access large disks and files on 32-bit systems.
CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64