Build and install collect2. This is needed for some C++ programs.
This commit is contained in:
parent
cf5eb7bb89
commit
dbb66afa0b
@ -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)
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user