git: 3aa023643e9d - main - Disable PIE for powerpc bootloaders.

Marcin Wojtas mw at FreeBSD.org
Wed Feb 24 23:26:43 UTC 2021


The branch main has been updated by mw:

URL: https://cgit.FreeBSD.org/src/commit/?id=3aa023643e9db78f4da314ff9bfb1643533c004f

commit 3aa023643e9db78f4da314ff9bfb1643533c004f
Author:     Marcin Wojtas <mw at FreeBSD.org>
AuthorDate: 2021-02-23 12:42:26 +0000
Commit:     Marcin Wojtas <mw at FreeBSD.org>
CommitDate: 2021-02-24 23:26:11 +0000

    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 at semihalf.com>
    Reviewed by: emaste
    Obtained from: Semihalf
    Sponsored by: Stormshield
    Differential Revision: https://reviews.freebsd.org/D28893
---
 stand/powerpc/boot1.chrp/Makefile | 2 ++
 stand/powerpc/kboot/Makefile      | 2 ++
 stand/powerpc/ofw/Makefile        | 2 ++
 stand/powerpc/uboot/Makefile      | 2 ++
 4 files changed, 8 insertions(+)

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>


More information about the dev-commits-src-all mailing list