Module Name:    src
Committed By:   matt
Date:           Sat Jun 22 02:21:58 UTC 2013

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

Log Message:
Allow crtbegin to be a C file.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 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.7 src/lib/csu/common/Makefile.inc:1.8
--- src/lib/csu/common/Makefile.inc:1.7	Sun Mar 25 06:55:19 2012
+++ src/lib/csu/common/Makefile.inc	Sat Jun 22 02:21:58 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.7 2012/03/25 06:55:19 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.8 2013/06/22 02:21:58 matt Exp $
 
 .include <bsd.own.mk>
 
@@ -12,18 +12,30 @@ OBJS+=		crtbegin.o crtbeginS.o crtend.o
 
 realall: ${OBJS}
 
+.if exists(${ARCHDIR}/crtbegin.c)
+crtbegin.o: crtbegin.c
+	${_MKTARGET_COMPILE}
+	${COMPILE.c} ${ARCHDIR}/crtbegin.c -o ${.TARGET}.o
+.else
 crtbegin.o: crtbegin.S
 	${_MKTARGET_COMPILE}
 	${COMPILE.S} ${ARCHDIR}/crtbegin.S -o ${.TARGET}.o
+.endif
 	${LD} -x -r -o ${.TARGET} ${.TARGET}.o
 	rm -f ${.TARGET}.o
 .if ${MKSTRIPIDENT} != "no"
 	${OBJCOPY} -R .ident ${.TARGET}
 .endif
 
+.if exists(${ARCHDIR}/crtbegin.c)
+crtbeginS.o: crtbegin.c
+	${_MKTARGET_COMPILE}
+	${COMPILE.c} -DPIC -DSHARED ${ARCHDIR}/crtbegin.c -o ${.TARGET}.o
+.else
 crtbeginS.o: crtbegin.S
 	${_MKTARGET_COMPILE}
 	${COMPILE.S} -DPIC -DSHARED ${ARCHDIR}/crtbegin.S -o ${.TARGET}.o
+.endif
 	${LD} -x -r -o ${.TARGET} ${.TARGET}.o
 	rm -f ${.TARGET}.o
 .if ${MKSTRIPIDENT} != "no"

Reply via email to