From f8f807a5ef00e8d5360fc2c9093bd0b5da8c0507 Mon Sep 17 00:00:00 2001 From: Bertrand SIMONNET Date: Mon, 30 Jun 2014 09:41:13 -0700 Subject: 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 Tested-by: Bertrand Simonnet Commit-Queue: Bertrand Simonnet --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.1