summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crunchgen
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2017-02-28 20:42:12 +0000
committerguenther <guenther@openbsd.org>2017-02-28 20:42:12 +0000
commit38b4dc229a0ec617a9b910fda621e350dcd8e763 (patch)
tree84558431eb886b95bc2a5ffcce1c1b1709d6b3ef /usr.sbin/crunchgen
parentCreate the /etc/installurl file during upgrade too if a mirror was (diff)
downloadwireguard-openbsd-38b4dc229a0ec617a9b910fda621e350dcd8e763.tar.xz
wireguard-openbsd-38b4dc229a0ec617a9b910fda621e350dcd8e763.zip
Make object-in-archive-used identification portable to lld: use --trace
instead of -M and transform the output to a common /path/to/archive.a(object.o) syntax. problem noted by jsg@ ok kettenis@ jsg@
Diffstat (limited to 'usr.sbin/crunchgen')
-rw-r--r--usr.sbin/crunchgen/crunchgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/crunchgen/crunchgen.c b/usr.sbin/crunchgen/crunchgen.c
index 938f44a5225..0d559f2bd8e 100644
--- a/usr.sbin/crunchgen/crunchgen.c
+++ b/usr.sbin/crunchgen/crunchgen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crunchgen.c,v 1.16 2015/11/11 02:52:46 deraadt Exp $ */
+/* $OpenBSD: crunchgen.c,v 1.17 2017/02/28 20:42:12 guenther Exp $ */
/*
* Copyright (c) 1994 University of Maryland
@@ -920,7 +920,7 @@ top_makefile_rules(FILE * outmk)
fprintf(outmk, "%s.map: %s.o $(CRUNCHED_OBJS)\n", execfname, execfname);
fprintf(outmk, "\t$(CC) -static ${LDFLAGS} -o %s.o.o %s.o $(CRUNCHED_OBJS) \\\n", execfname, execfname);
- fprintf(outmk, "\t $(LIBS) -Wl,-M | sed -e '/^Allocating/q' >${.TARGET}\n\n");
+ fprintf(outmk, "\t $(LIBS) -Wl,--trace | sed -e 's/^(\\(..*\\))\\(..*\\)/\\1(\\2)/' >${.TARGET}\n\n");
fprintf(outmk, "${CLIB:.a=.olist}: %s.map\n", execfname);
fprintf(outmk, "\tsed -n -e 's!^${DESTDIR}/usr/lib/${.TARGET:R}\\.a(\\([^)]*\\.o\\)).*!\\1!p' \\\n");