Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jan 2022 10:25:42 GMT
From:      Marcin Wojtas <mw@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 5b042fcbdff8 - stable/13 - Disable PIE for powerpc bootloaders.
Message-ID:  <202201231025.20NAPgFi088358@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mw:

URL: https://cgit.FreeBSD.org/src/commit/?id=5b042fcbdff8a651daecfbf91759fc8baf43ece0

commit 5b042fcbdff8a651daecfbf91759fc8baf43ece0
Author:     Marcin Wojtas <mw@FreeBSD.org>
AuthorDate: 2021-02-23 12:42:26 +0000
Commit:     Marcin Wojtas <mw@FreeBSD.org>
CommitDate: 2022-01-23 10:09:53 +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@semihalf.com>
    Reviewed by: emaste
    Obtained from: Semihalf
    Sponsored by: Stormshield
    Differential Revision: https://reviews.freebsd.org/D28893
    
    (cherry picked from commit 3aa023643e9db78f4da314ff9bfb1643533c004f)
---
 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 6d75bb882d2b..03844301f094 100644
--- a/stand/powerpc/ofw/Makefile
+++ b/stand/powerpc/ofw/Makefile
@@ -63,4 +63,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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201231025.20NAPgFi088358>