1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1994-08-02 20:15:59 +00:00
|
|
|
|
2000-06-04 06:56:23 +00:00
|
|
|
GCCDIR= ${.CURDIR}/../../../contrib/gcc.295
|
1999-04-04 16:36:35 +00:00
|
|
|
|
1999-08-16 04:27:28 +00:00
|
|
|
.PATH: ${GCCDIR}/cp ${GCCDIR}
|
1999-03-31 06:40:40 +00:00
|
|
|
|
2001-01-06 06:16:31 +00:00
|
|
|
# allow to be overridden for the a.out case
|
1999-10-03 02:43:20 +00:00
|
|
|
.if !defined(LIB) || ${LIB} != "gcc_r"
|
1994-08-02 20:15:59 +00:00
|
|
|
LIB= gcc
|
1999-10-03 02:43:20 +00:00
|
|
|
.endif
|
1996-09-21 14:27:38 +00:00
|
|
|
|
2001-01-06 06:16:31 +00:00
|
|
|
.if ${OBJFORMAT} == aout
|
1996-09-21 14:27:38 +00:00
|
|
|
# Install libgcc_pic.a, since ld.so uses it.
|
1995-03-06 12:17:49 +00:00
|
|
|
INSTALL_PIC_ARCHIVE= yes
|
2001-01-06 06:16:31 +00:00
|
|
|
.endif
|
1994-08-02 20:15:59 +00:00
|
|
|
|
1996-09-19 15:53:53 +00:00
|
|
|
#
|
|
|
|
# XXX This is a hack, but it seems to work. libgcc1.a is supposed to be
|
|
|
|
# compiled by the native compiler, and libgcc2.a is meant to be compiled
|
|
|
|
# by *this* version of gcc.
|
|
|
|
#
|
|
|
|
# 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
|
1998-07-08 00:45:50 +00:00
|
|
|
# compiler for some of the libgcc2.c __attribute__ stuff.
|
1996-09-19 15:53:53 +00:00
|
|
|
#
|
1998-07-08 00:45:50 +00:00
|
|
|
# We now depend on a bootstrap pass (normally in `make world') to build
|
|
|
|
# and install the new version of gcc before we get here. This makes
|
|
|
|
# finding the new version (XCC) easy but may break finding the old version
|
|
|
|
# (CC).
|
|
|
|
#
|
|
|
|
XCC= ${CC}
|
1999-04-04 16:36:35 +00:00
|
|
|
XCXX= ${CXX}
|
1996-09-19 15:53:53 +00:00
|
|
|
|
1996-10-01 03:47:36 +00:00
|
|
|
# Members of libgcc1.a.
|
|
|
|
LIB1FUNCS= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
|
|
|
|
_lshrsi3 _ashrsi3 _ashlsi3 \
|
|
|
|
_divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
|
|
|
|
_fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
|
|
|
|
_addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
|
|
|
|
_eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
|
|
|
|
_eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
|
1996-09-19 15:53:53 +00:00
|
|
|
|
1996-10-01 03:47:36 +00:00
|
|
|
# Library members defined in libgcc2.c.
|
|
|
|
LIB2FUNCS= _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
|
|
|
|
_lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
|
|
|
|
_udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
|
|
|
|
_fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
|
|
|
|
_fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
|
|
|
|
_fixtfdi _fixunstfdi _floatditf \
|
1999-04-04 16:36:35 +00:00
|
|
|
__gcc_bcmp _varargs __dummy _eprintf \
|
|
|
|
_bb _shtab _clear_cache _trampoline __main _exit _ctors \
|
1996-10-01 03:47:36 +00:00
|
|
|
_eh _pure
|
|
|
|
|
1999-04-04 16:36:35 +00:00
|
|
|
# Library members defined in new1.cc.
|
|
|
|
NEW1FUNCS= _op_new _op_newnt
|
|
|
|
|
|
|
|
# Library members defined in new2.cc.
|
|
|
|
NEW2FUNCS= _op_vnew _op_vnewnt _op_delete _op_delnt _op_vdel _op_vdelnt
|
|
|
|
|
|
|
|
SRCS= frame.c tinfo.cc tinfo2.cc new.cc exception.cc
|
|
|
|
|
|
|
|
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I.
|
|
|
|
CFLAGS+= -fexceptions
|
|
|
|
CFLAGS+= -DIN_GCC
|
2001-01-06 06:16:31 +00:00
|
|
|
.if ${OBJFORMAT} != aout
|
|
|
|
#CFLAGS+= -D_PTHREADS -fPIC -DGTHREAD_USE_WEAK
|
|
|
|
CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK
|
|
|
|
.endif
|
1999-04-04 16:36:35 +00:00
|
|
|
CXXFLAGS+= -I${GCCDIR}/cp/inc
|
|
|
|
CXXFLAGS+= -nostdinc++
|
|
|
|
|
1998-03-23 12:23:13 +00:00
|
|
|
COMMONHDRS= config.h tconfig.h tm.h
|
|
|
|
CLEANFILES+= ${COMMONHDRS}
|
1999-04-04 16:36:35 +00:00
|
|
|
SRCS+= ${COMMONHDRS}
|
1998-03-23 12:23:13 +00:00
|
|
|
|
|
|
|
LIB1OBJS= ${LIB1FUNCS:S/$/.o/}
|
|
|
|
LIB2OBJS= ${LIB2FUNCS:S/$/.o/}
|
1999-01-09 21:51:00 +00:00
|
|
|
LIB1SOBJS= ${LIB1FUNCS:S/$/.So/}
|
|
|
|
LIB2SOBJS= ${LIB2FUNCS:S/$/.So/}
|
1998-07-08 00:45:50 +00:00
|
|
|
LIB1POBJS= ${LIB1FUNCS:S/$/.po/}
|
|
|
|
LIB2POBJS= ${LIB2FUNCS:S/$/.po/}
|
1999-04-04 16:36:35 +00:00
|
|
|
NEW1OBJS= ${NEW1FUNCS:S/$/.o/}
|
|
|
|
NEW2OBJS= ${NEW2FUNCS:S/$/.o/}
|
|
|
|
NEW1SOBJS= ${NEW1FUNCS:S/$/.So/}
|
|
|
|
NEW2SOBJS= ${NEW2FUNCS:S/$/.So/}
|
|
|
|
NEW1POBJS= ${NEW1FUNCS:S/$/.po/}
|
|
|
|
NEW2POBJS= ${NEW2FUNCS:S/$/.po/}
|
1998-03-23 12:23:13 +00:00
|
|
|
|
1999-04-04 16:36:35 +00:00
|
|
|
OBJS= ${LIB1OBJS} ${LIB2OBJS} ${NEW1OBJS} ${NEW2OBJS}
|
1998-03-23 12:23:13 +00:00
|
|
|
|
1999-04-04 16:36:35 +00:00
|
|
|
config.h:
|
1999-11-15 00:49:35 +00:00
|
|
|
echo '#include <${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h>' > ${.TARGET}
|
|
|
|
echo '#include <xm-freebsd.h>' >> ${.TARGET}
|
1998-03-23 12:23:13 +00:00
|
|
|
|
1999-04-04 16:36:35 +00:00
|
|
|
tconfig.h:
|
1999-11-15 04:16:19 +00:00
|
|
|
echo '#include "gansidecl.h"' > ${.TARGET}
|
|
|
|
echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"' >> ${.TARGET}
|
1999-04-04 16:36:35 +00:00
|
|
|
|
1999-11-15 04:16:19 +00:00
|
|
|
# KEEP THIS IN SYNC with src/gcc/usr.bin/cc/cc_tools/Makefile !!
|
1998-03-23 12:23:13 +00:00
|
|
|
tm.h:
|
1999-11-15 00:49:35 +00:00
|
|
|
echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' > ${.TARGET}
|
1999-04-04 20:47:33 +00:00
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
1999-11-15 00:49:35 +00:00
|
|
|
echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET}
|
1999-04-04 20:47:33 +00:00
|
|
|
.endif
|
1999-11-15 04:16:19 +00:00
|
|
|
echo '#include <freebsd.h>' >> ${.TARGET}
|
1999-11-15 00:49:35 +00:00
|
|
|
echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET}
|
1999-04-04 20:41:50 +00:00
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
1999-11-15 00:49:35 +00:00
|
|
|
echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET}
|
1999-04-04 20:41:50 +00:00
|
|
|
.endif
|
1994-08-02 20:15:59 +00:00
|
|
|
|
1998-03-23 12:23:13 +00:00
|
|
|
${OBJS}: ${COMMONHDRS}
|
1994-08-02 20:15:59 +00:00
|
|
|
|
|
|
|
${LIB1OBJS}: libgcc1.c
|
1998-07-08 00:45:50 +00:00
|
|
|
${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
1998-10-06 11:28:29 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
|
|
|
|
${LIB2OBJS}: libgcc2.c
|
1998-07-08 00:45:50 +00:00
|
|
|
${XCC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
1998-10-06 11:28:29 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
|
1999-04-04 16:36:35 +00:00
|
|
|
${NEW1OBJS}: new1.cc
|
|
|
|
${XCXX} -c ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
|
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
|
|
|
|
|
|
|
${NEW2OBJS}: new2.cc
|
|
|
|
${CXX} -c ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
|
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
|
|
|
|
1994-08-02 20:15:59 +00:00
|
|
|
.if !defined(NOPIC)
|
|
|
|
${LIB1SOBJS}: libgcc1.c
|
1998-07-08 00:45:50 +00:00
|
|
|
${CC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
1998-10-06 11:28:29 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
|
|
|
|
${LIB2SOBJS}: libgcc2.c
|
1998-07-08 00:45:50 +00:00
|
|
|
${XCC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
1998-10-06 11:28:29 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1999-04-04 16:36:35 +00:00
|
|
|
|
|
|
|
${NEW1SOBJS}: new1.cc
|
|
|
|
${XCXX} -c -fpic ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
|
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
|
|
|
|
|
|
|
${NEW2SOBJS}: new2.cc
|
|
|
|
${CXX} -c -fpic ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
|
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(NOPROFILE)
|
1998-07-08 00:45:50 +00:00
|
|
|
${LIB1POBJS}: libgcc1.c
|
|
|
|
${CC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
1998-10-06 11:28:29 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
|
1998-07-08 00:45:50 +00:00
|
|
|
${LIB2POBJS}: libgcc2.c
|
|
|
|
${XCC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
1998-10-06 11:28:29 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1999-04-04 16:36:35 +00:00
|
|
|
|
|
|
|
${NEW1POBJS}: new1.cc
|
|
|
|
${XCXX} -c -p ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
|
|
|
|
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
|
|
|
|
|
|
|
${NEW2POBJS}: new2.cc
|
|
|
|
${CXX} -c -p ${CXXFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.cc}
|
|
|
|
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|