stand/uboot: Fix building of ubldr.bin

Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D34189
This commit is contained in:
Warner Losh 2022-02-07 13:14:48 -07:00
parent 949e395966
commit 27e64c99e4
2 changed files with 8 additions and 3 deletions

View File

@ -15,9 +15,9 @@ LOADER_DISK_SUPPORT?= yes
.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
.if ${MK_PIE} == "yes"
LOADER_UBLDR_BIN?= yes
.if ${LOADER_UBLDR_BIN} != "no"
FILES+= ubldr ubldr.bin
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
.else
PROG= ubldr
.endif
@ -75,6 +75,11 @@ CFLAGS+= -I${FDTSRC}
CFLAGS+= -DDISK_DEBUG
.endif
.if ${LOADER_UBLDR_BIN} != "no"
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
ubldr ubldr.bin ubldr.pie: ${OBJS}
.endif
DPADD= ${LDR_INTERP} ${LIBFDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBFDT} ${LIBSA}

View File

@ -3,4 +3,4 @@ SRCS+= start.S conf.c ppc64_elf_freebsd.c
.PATH: ${SYSDIR}/libkern
SRCS+= ucmpdi2.c
MK_PIE= no
LOADER_UBLDR_BIN= no