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 3aa023643e)
This commit is contained in:
Marcin Wojtas 2021-02-23 13:42:26 +01:00
parent afd4a49407
commit 5b042fcbdf
4 changed files with 8 additions and 0 deletions

View file

@ -43,5 +43,7 @@ boot1.hfs: boot1.elf bootinfo.txt
CLEANFILES+= boot1.hfs
MK_PIE= no
.include <bsd.prog.mk>

View file

@ -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>

View file

@ -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>

View file

@ -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>