Module Name:    src
Committed By:   uwe
Date:           Tue Jan 31 20:08:28 UTC 2012

Modified Files:
        src/lib/csu/common: Makefile.inc

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/csu/common/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/csu/common/Makefile.inc
diff -u src/lib/csu/common/Makefile.inc:1.5 src/lib/csu/common/Makefile.inc:1.6
--- src/lib/csu/common/Makefile.inc:1.5	Tue Jan 31 20:03:50 2012
+++ src/lib/csu/common/Makefile.inc	Tue Jan 31 20:08:28 2012
@@ -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

Reply via email to