mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
073193ed51
* Make autoboot() a static function in stand/common/boot.c, so it does not shadow local variables in gptboot.c and zfsboot.c. * Remove -Winline from the Makefiles for gptboot, gptzfsboot and zfsboot, as gcc will always fail to inline some functions, and there is nothing we can do about it. * For gcc <= 4.2.1, silence -Wuninitialized for isoboot, as it produces a false positive warning. * Remove deprecated and unnecessary -mcpu=i386 flag from stand/defs.mk, as there is already a -march=i386 flag further in the file. Reviewed by: imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D15628
72 lines
1.7 KiB
Makefile
72 lines
1.7 KiB
Makefile
# $FreeBSD$
|
|
|
|
HAVE_GELI= yes
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
.PATH: ${BOOTSRC}/i386/boot2 ${BOOTSRC}/i386/gptboot \
|
|
${BOOTSRC}/i386/common ${SASRC}
|
|
|
|
FILES= isoboot
|
|
MAN= isoboot.8
|
|
|
|
NM?= nm
|
|
|
|
BOOT_COMCONSOLE_PORT?= 0x3f8
|
|
BOOT_COMCONSOLE_SPEED?= 9600
|
|
B2SIOFMT?= 0x3
|
|
|
|
REL1= 0x700
|
|
ORG1= 0x7c00
|
|
ORG2= 0x0
|
|
|
|
ISOBOOTSIZE?= 30720
|
|
|
|
CFLAGS+=-DBOOTPROG=\"isoboot\" \
|
|
-O1 \
|
|
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
|
|
-DSIOFMT=${B2SIOFMT} \
|
|
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
|
|
-I${LDRSRC} \
|
|
-I${BOOTSRC}/i386/common \
|
|
-I${BOOTSRC}/i386/boot2 \
|
|
-Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
|
|
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
|
|
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
|
|
-Winline -Wno-pointer-sign
|
|
|
|
CFLAGS.gcc+= --param max-inline-insns-single=100
|
|
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201
|
|
CFLAGS.gcc+= -Wno-uninitialized
|
|
.endif
|
|
CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL}
|
|
|
|
LD_FLAGS+=${LD_FLAGS_BIN}
|
|
|
|
CLEANFILES+= isoboot
|
|
|
|
isoboot: gptldr.bin isoboot.bin ${BTXKERN}
|
|
btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l gptldr.bin \
|
|
-o ${.TARGET} isoboot.bin
|
|
@set -- `ls -l ${.TARGET}`; x=$$((${ISOBOOTSIZE}-$$5)); \
|
|
echo "$$x bytes available"; test $$x -ge 0
|
|
|
|
CLEANFILES+= gptldr.bin gptldr.out gptldr.o
|
|
|
|
gptldr.bin: gptldr.out
|
|
${OBJCOPY} -S -O binary gptldr.out ${.TARGET}
|
|
|
|
gptldr.out: gptldr.o
|
|
${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o
|
|
|
|
CLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o crc32.o drv.o \
|
|
cons.o ${OPENCRYPTO_XTS}
|
|
|
|
isoboot.bin: isoboot.out
|
|
${OBJCOPY} -S -O binary isoboot.out ${.TARGET}
|
|
|
|
isoboot.out: ${BTXCRT} isoboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS}
|
|
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSA32}
|
|
|
|
.include <bsd.prog.mk>
|