From 90b18434566845800419914b1dd20c5742fcbbd0 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 7 Jun 2017 16:01:07 +0000 Subject: [PATCH] make sure there are no duplicate object files linked when building syspatches --- share/mk/bsd.lib.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 3d6ea9d21d5..c4c58566732 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.lib.mk,v 1.82 2017/06/05 09:51:27 robert Exp $ +# $OpenBSD: bsd.lib.mk,v 1.83 2017/06/07 16:01:07 robert Exp $ # $NetBSD: bsd.lib.mk,v 1.67 1996/01/17 20:39:26 mycroft Exp $ # @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 @@ -186,7 +186,7 @@ ${FULLSHLIBNAME}: ${SOBJS} ${DPADD} .if defined(SYSPATCH) ${CC} -shared ${PICFLAG} -o ${.TARGET} \ `readelf -Ws ${LIBDIR}/${.TARGET} | awk '/ FILE/{gsub(/\..*/, ".so", $$NF); sub(".*/", "", $$NF); print $$NF}' | \ - egrep -v "(cmll-586|libgcc2|unwind-dw2)"` ${LDADD} + egrep -v "(cmll-586|libgcc2|unwind-dw2)" | awk '!x[$$0]++'` ${LDADD} .else ${CC} -shared ${PICFLAG} -o ${.TARGET} \ `echo ${SOBJS} | tr ' ' '\n' | sort -R` ${LDADD} -- 2.20.1