summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-04-06 23:12:46 +0000
committerobrien <obrien@FreeBSD.org>2002-04-06 23:12:46 +0000
commite3947f62483f9bc257f97ea94aca7ed61dec7c3a (patch)
tree7f5059488407d0d86000541a23b0230ec1ab9556 /gnu
parent19a0a4cab744689f75b9e42af057efe7b03f3372 (diff)
downloadFreeBSD-src-e3947f62483f9bc257f97ea94aca7ed61dec7c3a.zip
FreeBSD-src-e3947f62483f9bc257f97ea94aca7ed61dec7c3a.tar.gz
Build and install collect2. This is needed for some C++ programs.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/cc/Makefile3
-rw-r--r--gnu/usr.bin/cc/collect2/Makefile23
2 files changed, 26 insertions, 0 deletions
diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile
index 30ec119..95d580e 100644
--- a/gnu/usr.bin/cc/Makefile
+++ b/gnu/usr.bin/cc/Makefile
@@ -11,6 +11,9 @@ SUBDIR+= cpp
.if !defined(NO_CXX)
SUBDIR+= cc1plus c++ c++filt doc
+.if !defined(NO_COLLECT2)
+SUBDIR+= collect2
+.endif
.endif
.if !defined(NO_OBJC)
diff --git a/gnu/usr.bin/cc/collect2/Makefile b/gnu/usr.bin/cc/collect2/Makefile
index 08f29ef..8b28516 100644
--- a/gnu/usr.bin/cc/collect2/Makefile
+++ b/gnu/usr.bin/cc/collect2/Makefile
@@ -4,4 +4,27 @@
.PATH: ${GCCDIR}
+PROG= collect2
+SRCS= collect2.c cplus-dem.c tlink.c underscore.c
+BINDIR= /usr/libexec
+NOMAN=
+NOSHARED?=yes
+
+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
+
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud