Simply retire the sedification of the boot2.s file. It's been obsolete

for years.

clang before 96 free after 100 (+4)
gcc before 163 free after 156 (-7)

Suggested by: bde@
Sponsored by: Netflix
This commit is contained in:
Warner Losh 2017-03-28 07:58:27 +00:00
parent 156715d048
commit f2d4cc2f5f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316079

View file

@ -66,7 +66,7 @@ boot1.out: boot1.o
${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o
CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \
boot2.s boot2.s.tmp boot2.h sio.o
boot2.h sio.o
boot2: boot2.ld
@set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \
@ -86,24 +86,8 @@ boot2.bin: boot2.out
boot2.out: ${BTXCRT} boot2.o sio.o
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC}
boot2.o: boot2.s
${CC} ${ACFLAGS} -c boot2.s
SRCS= boot2.c boot2.h
# Gcc (4.2.1 at least) benefits from removing the forced alignment
# clang doesn't. Make the removal as specific as possible to avoid
# false positives (like path names with odd names for debugging info).
# In the past, gcc benefited from nop removal, but not in 4.2.1.
# Think of this as a poor-man's peephole optimizer for gcc 4.2.1
boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c
${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c
.if ${COMPILER_TYPE} == "gcc"
sed -e '/\.align 4/d' < boot2.s.tmp > boot2.s
.else
cp boot2.s.tmp boot2.s
.endif
boot2.h: boot1.out
${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \
{ x = $$1 - ORG1; \