aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Wojtas <mw@FreeBSD.org>2021-02-23 12:42:26 +0000
committerMarcin Wojtas <mw@FreeBSD.org>2021-02-24 23:26:11 +0000
commit3aa023643e9db78f4da314ff9bfb1643533c004f (patch)
treeb35a37972cdfdc79f96c2df0c5a02dbb590c4ff6
parentcd992885bcdfb3c2c6b761f5c3bf1c86949acdc3 (diff)
downloadsrc-3aa023643e9db78f4da314ff9bfb1643533c004f.tar.gz
src-3aa023643e9db78f4da314ff9bfb1643533c004f.zip
Disable PIE for powerpc bootloaders.
Bootloaders for powerpc are not built as position independent code. Since bsd.prog.mk is used for building, when PIE is enabled, the PIE flags are added and that causes the build to fail. Adding MK_PIE=no stops bsd.prog.mk from adding PIE specific flags. Submitted by: Dawid Gorecki <dgr@semihalf.com> Reviewed by: emaste Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D28893
-rw-r--r--stand/powerpc/boot1.chrp/Makefile2
-rw-r--r--stand/powerpc/kboot/Makefile2
-rw-r--r--stand/powerpc/ofw/Makefile2
-rw-r--r--stand/powerpc/uboot/Makefile2
4 files changed, 8 insertions, 0 deletions
diff --git a/stand/powerpc/boot1.chrp/Makefile b/stand/powerpc/boot1.chrp/Makefile
index e2f1739a4f4e..928f30e7eabb 100644
--- a/stand/powerpc/boot1.chrp/Makefile
+++ b/stand/powerpc/boot1.chrp/Makefile
@@ -43,5 +43,7 @@ boot1.hfs: boot1.elf bootinfo.txt
CLEANFILES+= boot1.hfs
+MK_PIE= no
+
.include <bsd.prog.mk>
diff --git a/stand/powerpc/kboot/Makefile b/stand/powerpc/kboot/Makefile
index 8b632ae3d076..a5e43ab6fdaa 100644
--- a/stand/powerpc/kboot/Makefile
+++ b/stand/powerpc/kboot/Makefile
@@ -42,4 +42,6 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
+MK_PIE= no
+
.include <bsd.prog.mk>
diff --git a/stand/powerpc/ofw/Makefile b/stand/powerpc/ofw/Makefile
index a35a7c7c56bf..7c2e97ebb382 100644
--- a/stand/powerpc/ofw/Makefile
+++ b/stand/powerpc/ofw/Makefile
@@ -53,4 +53,6 @@ CFLAGS+= -I${BOOTSRC}/libofw
DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
+MK_PIE= no
+
.include <bsd.prog.mk>
diff --git a/stand/powerpc/uboot/Makefile b/stand/powerpc/uboot/Makefile
index 9124507397ad..b0635104e454 100644
--- a/stand/powerpc/uboot/Makefile
+++ b/stand/powerpc/uboot/Makefile
@@ -31,4 +31,6 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
DPADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
+MK_PIE= no
+
.include <bsd.prog.mk>