summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libgcc
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-03-23 12:23:13 +0000
committerbde <bde@FreeBSD.org>1998-03-23 12:23:13 +0000
commiteb2023510e7171caec6da9df95511b33a6939eec (patch)
treee0174235e25a450e51ecd2008e69537bb7e22bb1 /gnu/lib/libgcc
parent4616b3ebefaf5f0c9deecdd5a8da0330def49e95 (diff)
downloadFreeBSD-src-eb2023510e7171caec6da9df95511b33a6939eec.zip
FreeBSD-src-eb2023510e7171caec6da9df95511b33a6939eec.tar.gz
Support building of libgcc.a without building all of gcc. This is
useful for bootstrapping. Compatible versions of gcc and cc1 should should be installed before using this feature.
Diffstat (limited to 'gnu/lib/libgcc')
-rw-r--r--gnu/lib/libgcc/Makefile49
1 files changed, 34 insertions, 15 deletions
diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile
index f9a1c3d..459529a 100644
--- a/gnu/lib/libgcc/Makefile
+++ b/gnu/lib/libgcc/Makefile
@@ -1,5 +1,5 @@
#
-# $Id$
+# $Id: Makefile,v 1.15 1997/02/22 15:45:08 peter Exp $
#
LIB= gcc
@@ -14,23 +14,27 @@ INSTALL_PIC_ARCHIVE= yes
#
# Normally, this does not make any difference, since we only have gcc, but
# when bootstrapping from gcc-2.6.3, we have to use the freshly built 2.7.2
-# compiler for some of the libgcc2.c __attribute__ stuff.
+# compiler for some of the libgcc2.c __attribute__ stuff. If there is no
+# freshly built compiler in a relative obj directory, then `make world'
+# must have recently installed it.
#
-.if exists(${.OBJDIR}/../cc)
+.if exists(${.OBJDIR}/../cc/cc)
XCC= ${.OBJDIR}/../cc/cc
-.else
+.elif exists(${.CURDIR}/../cc/cc)
XCC= ${.CURDIR}/../cc/cc
+.else
+XCC= cc
.endif
-.if exists(${.OBJDIR}/../cc1)
+.if exists(${.OBJDIR}/../cc1/cc1)
XCC+= -B${.OBJDIR}/../cc1/
-.else
+.elif exists(${.CURDIR}/../cc1/cc1)
XCC+= -B${.CURDIR}/../cc1/
.endif
-.if exists(${.OBJDIR}/../cpp)
+.if exists(${.OBJDIR}/../cpp/cpp)
XCC+= -B${.OBJDIR}/../cpp/
-.else
+.elif exists(${.CURDIR}/../cpp/cpp)
XCC+= -B${.CURDIR}/../cpp/
.endif
@@ -55,14 +59,29 @@ LIB2FUNCS= _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
_op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors \
_eh _pure
-LIB1OBJS=${LIB1FUNCS:T:S@$@.o@}
-LIB2OBJS=${LIB2FUNCS:T:S@$@.o@}
-LIB1SOBJS=${LIB1FUNCS:T:S@$@.so@}
-LIB2SOBJS=${LIB2FUNCS:T:S@$@.so@}
-P1OBJS=${LIB1FUNCS:T:S@$@.po@}
-P2OBJS=${LIB2FUNCS:T:S@$@.po@}
+COMMONHDRS= config.h tconfig.h tm.h
+CFLAGS+= -I.
+CLEANFILES+= ${COMMONHDRS}
+
+LIB1OBJS= ${LIB1FUNCS:S/$/.o/}
+LIB2OBJS= ${LIB2FUNCS:S/$/.o/}
+LIB1SOBJS= ${LIB1FUNCS:S/$/.so/}
+LIB2SOBJS= ${LIB2FUNCS:S/$/.so/}
+P1OBJS= ${LIB1FUNCS:S/$/.po/}
+P2OBJS= ${LIB2FUNCS:S/$/.po/}
+
+OBJS= ${LIB1OBJS} ${LIB2OBJS}
+
+config.h:
+ echo '#include "${MACHINE_ARCH}/xm-freebsd.h"' > ${.TARGET}
+
+tconfig.h:
+ echo '#include "${MACHINE_ARCH}/xm-freebsd.h"' > tconfig.h
+
+tm.h:
+ echo '#include "${MACHINE_ARCH}/freebsd.h"' > ${.TARGET}
-OBJS= ${LIB1OBJS} ${LIB2OBJS}
+${OBJS}: ${COMMONHDRS}
${LIB1OBJS}: libgcc1.c
${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc1.c
OpenPOWER on IntegriCloud