summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2003-11-24 17:01:47 +0000
committerespie <espie@openbsd.org>2003-11-24 17:01:47 +0000
commitb884cef25a82e2174290d05840b643d82b670175 (patch)
tree6739e1f7abc1a46d4a967abc204bbbd925dc54db
parentFix build for new location (diff)
downloadwireguard-openbsd-b884cef25a82e2174290d05840b643d82b670175.tar.xz
wireguard-openbsd-b884cef25a82e2174290d05840b643d82b670175.zip
pieces to grab c++filt directly off libiberty
-rw-r--r--gnu/usr.bin/cxxfilt/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/usr.bin/cxxfilt/Makefile b/gnu/usr.bin/cxxfilt/Makefile
new file mode 100644
index 00000000000..1cb0a41a419
--- /dev/null
+++ b/gnu/usr.bin/cxxfilt/Makefile
@@ -0,0 +1,26 @@
+NOMAN=1
+PROG=c++filt
+
+SRCS= cxxmain.c underscore.c
+LIBIBERTY_SRCDIR=${.CURDIR}/../../lib/libiberty/src
+LIBIBERTY_INCDIR=${.CURDIR}/../../lib/libiberty/include
+
+CFLAGS+=-I${LIBIBERTY_INCDIR} -DMAIN -DVERSION=\"${VERSION}\"
+VERSION=2.95.3
+
+LDADD= -liberty
+
+underscore.c:
+ @case ${ELF_TOOLCHAIN:L} in \
+ "yes") v=0;; \
+ *) v=1;; \
+ esac; \
+ c="int prepends_underscore=$$v;"; \
+ echo "echo \"$$c\" >$@"; \
+ echo $$c >$@
+
+cxxmain.c:
+ ln -s ${LIBIBERTY_SRCDIR}/cplus-dem.c $@
+
+CLEANFILES+=${SRCS}
+.include <bsd.prog.mk>