2002-04-06 09:35:06 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
.include "../Makefile.inc"
|
|
|
|
|
|
|
|
.PATH: ${GCCDIR}
|
|
|
|
|
2002-04-06 23:12:46 +00:00
|
|
|
PROG= collect2
|
|
|
|
SRCS= collect2.c cplus-dem.c tlink.c underscore.c
|
|
|
|
BINDIR= /usr/libexec
|
|
|
|
NOMAN=
|
2002-04-08 18:48:38 +00:00
|
|
|
NOSHARED=yes
|
2002-04-06 23:12:46 +00:00
|
|
|
|
|
|
|
DPADD+= ${LIBCC_INT}
|
|
|
|
LDADD+= ${LIBCC_INT}
|
|
|
|
|
|
|
|
CLEANFILES= tmp-dum.c tmp-dum.s underscore.c
|
|
|
|
underscore.c: Makefile
|
|
|
|
echo "int xxy_us_dummy;" >tmp-dum.c
|
|
|
|
${CC} -S tmp-dum.c
|
|
|
|
echo '/*WARNING: This file is automatically generated!*/' >underscore.c
|
|
|
|
if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \
|
|
|
|
echo "int prepends_underscore = 1;" >>underscore.c; \
|
|
|
|
else \
|
|
|
|
echo "int prepends_underscore = 0;" >>underscore.c; \
|
|
|
|
fi
|
|
|
|
# wrong to do this here, but easiest way out to duplicate gcc.c.
|
|
|
|
echo "char *xstrerror(int e) { return strerror(e); }" >>underscore.c
|
|
|
|
rm -f tmp-dum.c tmp-dum.s
|
|
|
|
|
2002-04-06 09:35:06 +00:00
|
|
|
.include <bsd.prog.mk>
|