summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/cxxfilt/Makefile16
-rw-r--r--gnu/usr.bin/cxxfilt/cxxfilt.c13
2 files changed, 20 insertions, 9 deletions
diff --git a/gnu/usr.bin/cxxfilt/Makefile b/gnu/usr.bin/cxxfilt/Makefile
index 1cb0a41a419..9ce23b85752 100644
--- a/gnu/usr.bin/cxxfilt/Makefile
+++ b/gnu/usr.bin/cxxfilt/Makefile
@@ -1,14 +1,11 @@
NOMAN=1
PROG=c++filt
-SRCS= cxxmain.c underscore.c
-LIBIBERTY_SRCDIR=${.CURDIR}/../../lib/libiberty/src
+SRCS= cxxfilt.c
LIBIBERTY_INCDIR=${.CURDIR}/../../lib/libiberty/include
-CFLAGS+=-I${LIBIBERTY_INCDIR} -DMAIN -DVERSION=\"${VERSION}\"
-VERSION=2.95.3
-
-LDADD= -liberty
+CFLAGS+=-I${LIBIBERTY_INCDIR}
+LDADD=-liberty
underscore.c:
@case ${ELF_TOOLCHAIN:L} in \
@@ -22,5 +19,10 @@ underscore.c:
cxxmain.c:
ln -s ${LIBIBERTY_SRCDIR}/cplus-dem.c $@
-CLEANFILES+=${SRCS}
.include <bsd.prog.mk>
+
+.if ${ELF_TOOLCHAIN:L} == "yes"
+CFLAGS+=-DTARGET_PREPENDS_UNDERSCORE=0
+.else
+CFLAGS+=-DTARGET_PREPENDS_UNDERSCORE=1
+.endif
diff --git a/gnu/usr.bin/cxxfilt/cxxfilt.c b/gnu/usr.bin/cxxfilt/cxxfilt.c
index e4289c8ea1b..2772ea0e40c 100644
--- a/gnu/usr.bin/cxxfilt/cxxfilt.c
+++ b/gnu/usr.bin/cxxfilt/cxxfilt.c
@@ -22,13 +22,22 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#if 0
#include "config.h"
#include "bfd.h"
#include "bucomm.h"
+#endif
#include "libiberty.h"
#include "demangle.h"
#include "getopt.h"
#include "safe-ctype.h"
+#include <stdio.h>
+
+char *program_name;
+#if 0
+#define PARAMS(x) x
+#define ATTRIBUTE_NORETURN
+#endif
static int flags = DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE;
@@ -192,7 +201,7 @@ main (argc, argv)
strip_underscore = 0;
break;
case 'v':
- print_version ("c++filt");
+ printf("c++filt 2.14");
return (0);
case '_':
strip_underscore = 1;
@@ -241,7 +250,7 @@ main (argc, argv)
/* Folks should explicitly indicate the appropriate alphabet for
each demangling. Providing a default would allow the
question to go unconsidered. */
- fatal ("Internal error: no symbol alphabet for current style");
+ errx (1, "Internal error: no symbol alphabet for current style");
}
for (;;)