From owner-svn-ports-head@freebsd.org Mon Nov 20 22:23:38 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87974DF72E2; Mon, 20 Nov 2017 22:23:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F021702F1; Mon, 20 Nov 2017 22:23:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAKMNbap001725; Mon, 20 Nov 2017 22:23:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAKMNbpo001724; Mon, 20 Nov 2017 22:23:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201711202223.vAKMNbpo001724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 Nov 2017 22:23:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r454582 - head/sysutils/safecat/files X-SVN-Group: ports-head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sysutils/safecat/files X-SVN-Commit-Revision: 454582 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2017 22:23:38 -0000 Author: emaste (src committer) Date: Mon Nov 20 22:23:37 2017 New Revision: 454582 URL: https://svnweb.freebsd.org/changeset/ports/454582 Log: sysutils/safecat: avoid duplicating object files in library Previously byte_copy.o and str_len.o were added to str.a, and then specified as objects on the safecat link command line along with str. When linking with lld this produces duplicate symbol errors like: /usr/bin/ld: error: duplicate symbol: byte_copy >>> defined at byte_copy.c >>> byte_copy.o:(byte_copy) in archive str.a >>> defined at byte_copy.c >>> byte_copy.o(.text+0x0) As these symbols are provided by str.a just avoid listing the object files as well. PR: 221811 Approved by: matthew Sponsored by: The FreeBSD Foundation Added: head/sysutils/safecat/files/patch-Makefile (contents, props changed) Added: head/sysutils/safecat/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/safecat/files/patch-Makefile Mon Nov 20 22:23:37 2017 (r454582) @@ -0,0 +1,35 @@ + sysutils/safecat: avoid duplicating object files in library + + Previously byte_copy.o and str_len.o were added to str.a, and then + specified as objects on the safecat link command line along with str. + When linking with lld this produces duplicate symbol errors like: + + /usr/bin/ld: error: duplicate symbol: byte_copy + >>> defined at byte_copy.c + >>> byte_copy.o:(byte_copy) in archive str.a + >>> defined at byte_copy.c + >>> byte_copy.o(.text+0x0) + + As these symbols are provided by str.a just avoid listing the object + files as well. +--- Makefile.orig 2017-08-25 13:36:12.671931000 -0400 ++++ Makefile 2017-08-25 13:36:36.138079000 -0400 +@@ -219,14 +219,14 @@ + + safecat: \ + load safecat.o getln.a str.a stralloc.a strerr.a substdio.a alloc.o \ +-alloc_re.o byte_copy.o byte_cr.o envread.o error.o error_str.o fmt_uint64.o \ +-hostname.o sig.o stat_dir.o str_diffn.o str_len.o substdio_copy.o \ ++alloc_re.o byte_cr.o envread.o error.o error_str.o fmt_uint64.o \ ++hostname.o sig.o stat_dir.o str_diffn.o substdio_copy.o \ + substdi.o substdio.o taia_fmtfrac.o taia_now.o taia_tai.o tempfile.o \ + writefile.o + ./load safecat getln.a str.a stralloc.a strerr.a substdio.a \ +- alloc.o alloc_re.o byte_copy.o byte_cr.o envread.o error.o \ ++ alloc.o alloc_re.o byte_cr.o envread.o error.o \ + error_str.o fmt_uint64.o hostname.o sig.o stat_dir.o str_diffn.o \ +- str_len.o substdi.o substdio.o substdio_copy.o taia_fmtfrac.o \ ++ substdi.o substdio.o substdio_copy.o taia_fmtfrac.o \ + taia_now.o taia_tai.o tempfile.o writefile.o + + safecat.0: \