Disable PIE for MIPS ubldr

When performing buildworld for MIPS with PIE enabled, the build fails
with "position-independent code requires '-mabicalls'" message.
-mno-abicalls and -fno-pic flags are explicitly set in MIPS ubldr
makefile, so to work around this problem, set MK_PIE=no for MIPS
ubldr.

Submitted by: Dawid Gorecki <dgr@semihalf.com>
Reviewed by: emaste
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D28370
This commit is contained in:
Marcin Wojtas 2021-02-12 16:41:49 +01:00
parent 6dd69f0064
commit cd992885bc

View File

@ -44,6 +44,10 @@ LDADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
# ubldr on MIPS is built with '-mno-abicalls' flag,
# which is incompatible with PIE
MK_PIE= no
ldscript.abs:
echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET}