aa2dd958b4
Many components under stand/ had CLANG_NO_IAS added when Clang's Integrated Assembler (IAS) did not handle .codeNN directives. Clang gained support quite some time ago, and we can now build stand/ with IAS. In most cases IAS- and GNU as-assembled boot components were identical, and CLANG_NO_IAS was already removed from other components. Clang IAS produces different output for some components, including pxeldr, so CLANG_NO_IAS was not previously removed for those. In the case of pxeldr the difference is that IAS adds a size override prefix (67h) to three instructions to specify a 32-bit address, even though the two high bytes are zero and the address fits in 16 bits. this wastes three bytes per instruction and causes some additional nop npadding to be required elsewhere in the object, but pxeboot is not size-constrained so it doesn't matter. Sponsored by: The FreeBSD Foundation
46 lines
832 B
Makefile
46 lines
832 B
Makefile
# $FreeBSD$
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
PROG= ${LDR}
|
|
INTERNALPROG=
|
|
FILES= ${BOOT}
|
|
MAN= ${BOOT}.8
|
|
SRCS= ${LDR}.S
|
|
CLEANFILES+= ${BOOT}
|
|
|
|
BOOT= pxeboot
|
|
LDR= pxeldr
|
|
ORG= 0x7c00
|
|
LOADER= loader
|
|
|
|
.if defined(BOOT_PXELDR_PROBE_KEYBOARD)
|
|
CFLAGS+=-DPROBE_KEYBOARD
|
|
.endif
|
|
|
|
.if defined(BOOT_PXELDR_ALWAYS_SERIAL)
|
|
CFLAGS+=-DALWAYS_SERIAL
|
|
.endif
|
|
|
|
CFLAGS+=-I${BOOTSRC}/i386/common
|
|
|
|
L=${LOADER_DEFAULT_INTERP}
|
|
LOADERBIN= ${BOOTOBJ}/i386/loader_${L}/loader_${L}.bin
|
|
|
|
CLEANFILES+= ${BOOT}.tmp
|
|
|
|
${BOOT}: ${LDR} ${LOADER}
|
|
cat ${LDR} ${LOADER} > ${.TARGET}.tmp
|
|
${DD} if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync
|
|
rm ${.TARGET}.tmp
|
|
|
|
LDFLAGS+=${LDFLAGS_BIN}
|
|
|
|
CLEANFILES+= ${LOADER}
|
|
|
|
${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN}
|
|
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
|
|
-b ${BTXKERN} ${LOADERBIN}
|
|
|
|
.include <bsd.prog.mk>
|