summaryrefslogtreecommitdiff
path: root/stand/efi
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2020-10-12 11:27:08 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2020-10-12 11:27:08 +0000
commit253e820a4db794c4c5e39e8e6d6bf2775f25d0cc (patch)
treeccda787f69b5f325aae9fbf769f831cfc0411805 /stand/efi
parentcf084e9e9283ba2e4a5a73e54552508fff763379 (diff)
downloadsrc-test-253e820a4db794c4c5e39e8e6d6bf2775f25d0cc.tar.gz
src-test-253e820a4db794c4c5e39e8e6d6bf2775f25d0cc.zip
Link efi programs with -pie rather than -shared
This was causing build failures in CheriBSD where we were passing -pie already by default. Reviewed By: andrew Differential Revision: https://reviews.freebsd.org/D24787
Notes
Notes: svn path=/head/; revision=366644
Diffstat (limited to 'stand/efi')
-rw-r--r--stand/efi/boot1/Makefile2
-rw-r--r--stand/efi/loader/Makefile2
2 files changed, 2 insertions, 2 deletions
diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile
index aa74cfeed71bc..0359dff005489 100644
--- a/stand/efi/boot1/Makefile
+++ b/stand/efi/boot1/Makefile
@@ -63,7 +63,7 @@ FILES= ${BOOT1}.efi
FILESMODE_${BOOT1}.efi= ${BINMODE}
LDSCRIPT= ${EFISRC}/loader/arch/${MACHINE}/ldscript.${MACHINE}
-LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared
+LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -pie
.if ${MACHINE_CPUARCH} == "aarch64"
CFLAGS+= -mgeneral-regs-only
diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile
index a8fbaabfdf4eb..a0e7f95b82002 100644
--- a/stand/efi/loader/Makefile
+++ b/stand/efi/loader/Makefile
@@ -82,7 +82,7 @@ LINKS+= ${BINDIR}/${LOADER}.efi ${BINDIR}/loader.efi
.endif
LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE}/ldscript.${MACHINE}
-LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared
+LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -pie
CLEANFILES+= loader.efi