csu: move crt files to /usr/lib
authorSimon Schubert <corecode@dragonflybsd.org>
Sun, 19 Apr 2009 22:46:24 +0000 (00:46 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Sun, 19 Apr 2009 22:48:19 +0000 (00:48 +0200)
Instead of installing our start files in gcc directories, install the
generic ones in /usr/lib.  This should make porting other compilers more
easy.

Requested-by: hasso@
Makefile.inc1
Makefile_upgrade.inc
gnu/lib/csu/Makefile.csu
gnu/lib/gcc34/csu/Makefile
gnu/lib/gcc41/csu/Makefile
lib/Makefile
lib/csu/Makefile [new file with mode: 0644]
lib/csu/amd64/Makefile.csu
lib/csu/i386/Makefile.csu

index 709b0d9..9b1bdac 100644 (file)
@@ -875,7 +875,7 @@ libraries:
 #
 _startup_libs34=       gnu/lib/gcc34/csu gnu/lib/gcc34/libgcc
 _startup_libs41=       gnu/lib/gcc41/csu gnu/lib/gcc41/libgcc
-_startup_libs=         lib/libc lib/libc_rtld
+_startup_libs=         lib/csu lib/libc lib/libc_rtld
 
 _prebuild_libs=                lib/libbz2 lib/libz lib/libarchive
 _prebuild_libs+=       lib/libutil
index 005257f..66c50be 100644 (file)
@@ -1101,4 +1101,12 @@ TO_REMOVE+=/usr/share/man/man3/CIRCLEQ_PREV.3.gz
 TO_REMOVE+=/usr/share/man/cat3/CIRCLEQ_REMOVE.3.gz
 TO_REMOVE+=/usr/share/man/man3/CIRCLEQ_REMOVE.3.gz
 TO_REMOVE+=/usr/share/man/cat3/fts_getstream.3.gz
-TO_REMOVE+=/usr/share/man/man3/fts_getstream.3.gz
\ No newline at end of file
+TO_REMOVE+=/usr/share/man/man3/fts_getstream.3.gz
+TO_REMOVE+=/usr/lib/gcc34/gcrt1.o
+TO_REMOVE+=/usr/lib/gcc34/crt1.o
+TO_REMOVE+=/usr/lib/gcc34/crti.o
+TO_REMOVE+=/usr/lib/gcc34/crtn.o
+TO_REMOVE+=/usr/lib/gcc41/gcrt1.o
+TO_REMOVE+=/usr/lib/gcc41/crt1.o
+TO_REMOVE+=/usr/lib/gcc41/crti.o
+TO_REMOVE+=/usr/lib/gcc41/crtn.o
index cc9a67e..46908ae 100644 (file)
@@ -1,8 +1,6 @@
 # $FreeBSD: src/gnu/lib/csu/Makefile,v 1.24 2004/09/10 06:48:04 ru Exp $
 # $DragonFly: src/gnu/lib/csu/Makefile.csu,v 1.2 2007/08/23 06:52:02 corecode Exp $
 
-.include "${CSUDIR}/Makefile.csu"
-
 SRCS+=         crtstuff.c
 HDRS+=         tm.h
 
index dd825d9..e9b4bf8 100644 (file)
@@ -3,7 +3,5 @@
 GCCDIR=        ${.CURDIR}/../../../../contrib/gcc-3.4
 CCDIR= ${.CURDIR}/../../../usr.bin/cc34
 
-CSUDIR=        ${.CURDIR}/../../../../lib/csu/${MACHINE_ARCH}
-
 .include "../Makefile.inc"
 .include "../../csu/Makefile.csu"
index 598d963..df102b8 100644 (file)
@@ -3,7 +3,5 @@
 GCCDIR=        ${.CURDIR}/../../../../contrib/gcc-4.1
 CCDIR= ${.CURDIR}/../../../usr.bin/cc41
 
-CSUDIR=        ${.CURDIR}/../../../../lib/csu/${MACHINE_ARCH}
-
 .include "../Makefile.inc"
 .include "../../csu/Makefile.csu"
index 7a65be9..479fede 100644 (file)
@@ -18,7 +18,8 @@
 #
 # Otherwise, the SUBDIR list should be in alphabetical order.
 
-SUBDIR=        libarchive libbluetooth libcom_err libcrypt libm libmd \
+SUBDIR=        csu \
+       libarchive libbluetooth libcom_err libcrypt libm libmd \
        libncurses libradius libtacplus libutil libsbuf \
        libalias libatm ${_libbind} ${_libbind9} libbz2 libc ${_libc_r} \
        libcalendar libcam libcompat libdevinfo libdevstat libedit libevent libfetch \
diff --git a/lib/csu/Makefile b/lib/csu/Makefile
new file mode 100644 (file)
index 0000000..723a7a4
--- /dev/null
@@ -0,0 +1,14 @@
+CSUDIR=        ${.CURDIR}/${MACHINE_ARCH}
+
+.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.csu"
+
+OBJS+= ${SRCS:M*.[cS]:R:C/$/.o/g}
+
+all: ${OBJS}
+
+realinstall:
+       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+           ${OBJS} ${DESTDIR}${LIBDIR}
+
+
+.include <bsd.lib.mk>
index de2f807..9efa444 100644 (file)
@@ -1,8 +1,6 @@
 # $FreeBSD: src/lib/csu/amd64/Makefile,v 1.18 2003/06/30 12:53:39 ru Exp $
 # $DragonFly: src/lib/csu/amd64/Makefile.csu,v 1.2 2007/07/11 21:12:50 corecode Exp $
 
-CSUDIR?=       ${.CURDIR}
-
 SRCS+=         crt1.c crti.S crtn.S
 OBJS+=         gcrt1.o
 INSTALLOBJS+=  crt1.o crti.o crtn.o gcrt1.o
index 519b567..6c30f68 100644 (file)
@@ -1,8 +1,6 @@
 # $FreeBSD: src/lib/csu/i386-elf/Makefile,v 1.6.2.5 2002/11/23 17:44:29 ru Exp $
 # $DragonFly: src/lib/csu/i386/Makefile.csu,v 1.1 2007/01/15 18:01:44 corecode Exp $
 
-CSUDIR?=       ${.CURDIR}
-
 SRCS+=         crt1.c crti.S crtn.S
 OBJS+=         gcrt1.o
 INSTALLOBJS+=  crt1.o crti.o crtn.o gcrt1.o