1994-08-02 20:15:59 +00:00
|
|
|
#
|
1997-01-14 07:20:47 +00:00
|
|
|
# $FreeBSD$
|
1994-08-02 20:15:59 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
LIB= gcc
|
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
|
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
|
|
|
|
# compiler for some of the libgcc2.c __attribute__ stuff.
|
|
|
|
#
|
|
|
|
.if exists(${.OBJDIR}/../cc)
|
|
|
|
XCC= ${.OBJDIR}/../cc/cc
|
|
|
|
.else
|
|
|
|
XCC= ${.CURDIR}/../cc/cc
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if exists(${.OBJDIR}/../cc1)
|
|
|
|
XCC+= -B${.OBJDIR}/../cc1/
|
|
|
|
.else
|
|
|
|
XCC+= -B${.CURDIR}/../cc1/
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if exists(${.OBJDIR}/../cpp)
|
|
|
|
XCC+= -B${.OBJDIR}/../cpp/
|
|
|
|
.else
|
|
|
|
XCC+= -B${.CURDIR}/../cpp/
|
|
|
|
.endif
|
|
|
|
|
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 \
|
|
|
|
__gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler \
|
|
|
|
_op_delete \
|
|
|
|
_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@}
|
1994-08-02 20:15:59 +00:00
|
|
|
|
|
|
|
OBJS= ${LIB1OBJS} ${LIB2OBJS}
|
|
|
|
|
|
|
|
${LIB1OBJS}: libgcc1.c
|
1996-09-19 15:53:53 +00:00
|
|
|
${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc1.c
|
|
|
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
|
|
|
|
${LIB2OBJS}: libgcc2.c
|
1996-09-19 15:53:53 +00:00
|
|
|
${XCC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc2.c
|
|
|
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
|
|
|
|
.if !defined(NOPIC)
|
|
|
|
${LIB1SOBJS}: libgcc1.c
|
1996-09-19 15:53:53 +00:00
|
|
|
${CC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc1.c
|
|
|
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
|
|
|
|
${LIB2SOBJS}: libgcc2.c
|
1996-09-19 15:53:53 +00:00
|
|
|
${XCC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc2.c
|
|
|
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(NOPROFILE)
|
|
|
|
${P1OBJS}: libgcc1.c
|
1996-09-19 15:53:53 +00:00
|
|
|
${CC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc1.c
|
|
|
|
@${LD} -O ${.TARGET} -X -r ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
|
|
|
|
${P2OBJS}: libgcc2.c
|
1996-09-19 15:53:53 +00:00
|
|
|
${XCC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc2.c
|
|
|
|
@${LD} -O ${.TARGET} -X -r ${.TARGET}
|
1994-08-02 20:15:59 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|