summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2021-07-11 05:28:22 +0300
committerAnup Patel <anup@brainfault.org>2021-07-11 17:33:06 +0300
commit09ad811ec4661b99a67b87f28c93177367ae911e (patch)
treeb0ddd4520450dc8d112561acf9a1b7eb596315c5 /firmware
parenta3d328ae33a3e64d219b50269b4c013d363e9b82 (diff)
downloadopensbi-09ad811ec4661b99a67b87f28c93177367ae911e.tar.xz
firmware: Only default FW_PIC to y if supported
Bare-metal GNU ld does not support PIE, so if using it this will result in a failure to build. Instead, default to FW_PIC=n if not supported. Note that an explicit FW_PIC=y is not overridden, to ensure the build fails rather than silently producing a position-dependent binary. Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/objects.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/objects.mk b/firmware/objects.mk
index 83f98ad..a1704c4 100644
--- a/firmware/objects.mk
+++ b/firmware/objects.mk
@@ -14,7 +14,7 @@ firmware-asflags-y +=
firmware-ldflags-y +=
ifndef FW_PIC
-FW_PIC := y
+FW_PIC := $(OPENSBI_LD_PIE)
endif
ifeq ($(FW_PIC),y)