summaryrefslogtreecommitdiff
path: root/usr.sbin/crunchgen
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2017-02-28 20:42:13 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2017-02-28 20:42:13 +0000
commit9d6e07872e6e7c7f8448e75d16d11282a3facc51 (patch)
treef836a703df9b8dc4e3e775b7bf36b272d4155572 /usr.sbin/crunchgen
parenta8f9126e829657d181cc53be9b343960c97ca408 (diff)
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");