From 3aa023643e9db78f4da314ff9bfb1643533c004f Mon Sep 17 00:00:00 2001 From: Marcin Wojtas Date: Tue, 23 Feb 2021 13:42:26 +0100 Subject: [PATCH] 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 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 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 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 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