Move crt0.S in front of crt0-common.c when building crt0.o and gcrt0.o.

Reading disassembly is easier when the asm crt0.S trampoline is at the
start, not hidden behind the C code in crt0-common.c.
This commit is contained in:
uwe 2012-01-31 20:08:28 +00:00
parent 7f5b6b22a1
commit 5ade3e48ae
1 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.5 2012/01/31 20:03:50 uwe Exp $
# $NetBSD: Makefile.inc,v 1.6 2012/01/31 20:08:28 uwe Exp $
.include <bsd.own.mk>
@ -45,22 +45,22 @@ PICFLAGS= -fPIC
PICFLAGS=
.endif
crt0.o: crt0-common.c crt0.S
crt0.o: crt0.S crt0-common.c
${_MKTARGET_COMPILE}
${COMPILE.c} ${PICFLAGS} ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o
${COMPILE.S} ${ARCHDIR}/crt0.S -o ${.TARGET}.S.o
${LD} -x -r -o ${.TARGET} ${.TARGET}.c.o ${.TARGET}.S.o
rm -f ${.TARGET}.c.o ${.TARGET}.S.o
${COMPILE.c} ${PICFLAGS} ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o
${LD} -x -r -o ${.TARGET} ${.TARGET}.S.o ${.TARGET}.c.o
rm -f ${.TARGET}.S.o ${.TARGET}.c.o
.if ${MKSTRIPIDENT} != "no"
${OBJCOPY} -R .ident ${.TARGET}
.endif
gcrt0.o: crt0-common.c crt0.S
gcrt0.o: crt0.S crt0-common.c
${_MKTARGET_COMPILE}
${COMPILE.c} ${PICFLAGS} -DMCRT0 ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o
${COMPILE.S} ${ARCHDIR}/crt0.S -o ${.TARGET}.S.o
${LD} -x -r -o ${.TARGET} ${.TARGET}.c.o ${.TARGET}.S.o
rm -f ${.TARGET}.c.o ${.TARGET}.S.o
${COMPILE.c} ${PICFLAGS} -DMCRT0 ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o
${LD} -x -r -o ${.TARGET} ${.TARGET}.S.o ${.TARGET}.c.o
rm -f ${.TARGET}.S.o ${.TARGET}.c.o
.if ${MKSTRIPIDENT} != "no"
${OBJCOPY} -R .ident ${.TARGET}
.endif