diff options
author | peter <peter@FreeBSD.org> | 1996-10-13 17:37:03 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-10-13 17:37:03 +0000 |
commit | 9aec27bf177439598ee74b91dd8f01233cb3a1b6 (patch) | |
tree | cba3ebd3f8d401f0c4388eb42334945026750822 /gnu | |
parent | 9f6e7c4a28c02fa4a85c20946e3b5049dcdb5939 (diff) | |
download | FreeBSD-src-9aec27bf177439598ee74b91dd8f01233cb3a1b6.zip FreeBSD-src-9aec27bf177439598ee74b91dd8f01233cb3a1b6.tar.gz |
Build/install c++filt from g++, we already have all the sources and
it's and useful. (Ever tried to read 'nm' and 'ldd -v' output on a c++
object or library? :-) This filter decodes the mangled symbol names.)
Requested by: Chuck Robey <chuckr@glue.umd.edu>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/cc/Makefile | 7 | ||||
-rw-r--r-- | gnu/usr.bin/cc/c++filt/Makefile | 55 |
2 files changed, 60 insertions, 2 deletions
diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile index a8f304a..0ee469f 100644 --- a/gnu/usr.bin/cc/Makefile +++ b/gnu/usr.bin/cc/Makefile @@ -1,7 +1,10 @@ # -# $Id$ +# $Id: Makefile,v 1.6 1996/09/19 15:37:58 peter Exp $ # -SUBDIR= cc_tools cc_int cpp cc1 cc cc1obj cc1plus c++ f77 libgcc doc +# The order of some of these are rather important. Some depend on previous +# subdirs. + +SUBDIR= cc_tools cc_int cpp cc1 cc cc1obj cc1plus c++ f77 libgcc c++filt doc .include <bsd.subdir.mk> diff --git a/gnu/usr.bin/cc/c++filt/Makefile b/gnu/usr.bin/cc/c++filt/Makefile new file mode 100644 index 0000000..5e801de --- /dev/null +++ b/gnu/usr.bin/cc/c++filt/Makefile @@ -0,0 +1,55 @@ +# +# $Id$ +# + +PROG = c++filt +SRCS = cplus-dem.c getopt.c getopt1.c +OBJS+= underscore.o # defeat 'make depend' +BINDIR= /usr/bin +NOMAN= 1 +CFLAGS+= -DMAIN -DIN_GCC -DVERSION=\"$(version)\" + + +# +# 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 + +CLEANFILES+= underscore.c +underscore.o: underscore.c + +underscore.c: + echo "int xxy_us_dummy;" >tmp-dum.c + ${XCC} -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 + rm -f tmp-dum.c tmp-dum.s + +.include <bsd.prog.mk> + |