Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu/common Allow crtbegin to be a C file.



details:   https://anonhg.NetBSD.org/src/rev/321508edf352
branches:  trunk
changeset: 787524:321508edf352
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Jun 22 02:21:58 2013 +0000

description:
Allow crtbegin to be a C file.

diffstat:

 lib/csu/common/Makefile.inc |  14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r 542337856692 -r 321508edf352 lib/csu/common/Makefile.inc
--- a/lib/csu/common/Makefile.inc       Sat Jun 22 00:44:17 2013 +0000
+++ b/lib/csu/common/Makefile.inc       Sat Jun 22 02:21:58 2013 +0000
@@ -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 @@
 
 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"



Home | Main Index | Thread Index | Old Index