From nobody Wed Mar 15 17:40:08 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PcHj54TrZz3xYQF; Wed, 15 Mar 2023 17:40:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PcHj51HRWz3PDh; Wed, 15 Mar 2023 17:40:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678902009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XfDfmKZK/EfqC6pOez8E18ewplihYjFaBmXUt3AwbjE=; b=LQ8NhMQt5aE8ZMMQraFMccu+ANANTAfQcK2feCiTiisqyBuSs/HcXN43AJxGrjvw2cLlw2 /rfEJ1ryVpuguu02dma9zNCdemK2+QqYWWiUTerlePgEfXbH3PihcwNeCElV65Uv+K/idG OR/ByL4TEKW65rLjMtkpvItURimb3t+y6Tcs+s/HPEzeCPWTLlTzP3MdrFoZzL4oimqtzf mKea2p9Ojge6B43nsRm0Hr348NFFngch1uzFE+dPUo4iDCiVGuadjI0365tE82TY0x/Pxd zpB+zW4O9TbxDjHhtJvgFq1BqW/F8j6+YhNyQelelAF3pXkNjMBzhxKCCUiT0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678902009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XfDfmKZK/EfqC6pOez8E18ewplihYjFaBmXUt3AwbjE=; b=IyYrSrnLxiV6Pwn7vAQ2lVfVEcq6IAMnrTwaczhUpgVEh7MK7uflY4pXnwaaOw4tlBIVx6 ZYWols2Yi9DPkI/I9+5s8GCMELrl3Dwlmqtcmgw+OY8ilfa5tzupyWmTEwbbEUoAQ/RPdf +xipakHdXULEtuIsPg9G59QtmNri8aJJaalx6Fs6aKJtNJMqQxfHKaI4d6CgUlco4CndTW AQGoAIDVkbz8r82BoW+m3PuCrK+i4z01VXTkIP0rm2ULjxL3G8vid4zUA81OX/r70dZ3eJ zcPVROBxVM/FmkOtiBOjIp6dyp7p0wtPg6Iiy2Mv9jeGGJGQ30GiLv0rhus0GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678902009; a=rsa-sha256; cv=none; b=vYAOkorv4er5j1GmacakLLYDBj2fnWyUACWLOpKQdJGwylQnrmow1YCvQnXWIgz4VQkStB K6fxGQzh8WShLbWe9o6tCeoRUoeYH4gzVugR4mpsVi+gKY30b9Qq42uuUriKhQgew4Mi1N 7CYPMCsSwcfUnS39nZG9tOpD7s0uz5X5Olf8XeB5y/snzK9t+TwKDFpevzN8iCMYvZWNVy WsvmOrpo0rgZ+2W0evhcjfj3LAqVgOTbbU4tLcNlVwb4KoyBmEvWaU88hLmq5w5Ue3vdVq Lya/mkULDwxLNrVmO16u/XMMk30TIstortZmr9nX12+Vpo7XtOfTBH4FJsMcyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PcHj50Pg6z1Q4s; Wed, 15 Mar 2023 17:40:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32FHe8Tw043785; Wed, 15 Mar 2023 17:40:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32FHe8Yc043778; Wed, 15 Mar 2023 17:40:08 GMT (envelope-from git) Date: Wed, 15 Mar 2023 17:40:08 GMT Message-Id: <202303151740.32FHe8Yc043778@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: 6ccc29514e16 - main - devel/binutils: Enable shared List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ccc29514e16e9d9b8ccc5da9ae4e74ff93953ea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=6ccc29514e16e9d9b8ccc5da9ae4e74ff93953ea commit 6ccc29514e16e9d9b8ccc5da9ae4e74ff93953ea Author: Cy Schubert AuthorDate: 2023-03-12 18:10:55 +0000 Commit: Cy Schubert CommitDate: 2023-03-15 17:39:10 +0000 devel/binutils: Enable shared The submittor's reason for this change is that shared libraries makes dependencies easier to track. However, this is not the primary reason to add shared library support. Shared libraries are more secure because should a depending package, such as binutils, require a security update any depending packages will immediately reap the benefit of the newly secured package. This change only affects the native flavor because when 2f26d37a5937 (SVN r517642) changed the port from slave ports of binutils to FLAVORS, it mistakenly removed shared libraries from the native package. Prior to this 2f26d37a5937 only non-native packages were built producing only static libraries. This revision restores the behabviour of prior to 2f26d37a5937. PR: 270146 Reported by: yuri Fixes: 2f26d37a5937 (SVN r517642) --- devel/binutils/Makefile | 17 ++++++++++++++--- devel/binutils/pkg-plist | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/devel/binutils/Makefile b/devel/binutils/Makefile index 8b8f9a3c200d..a468d736263d 100644 --- a/devel/binutils/Makefile +++ b/devel/binutils/Makefile @@ -1,6 +1,6 @@ PORTNAME= binutils DISTVERSION= 2.40 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH?= 1 CATEGORIES?= devel MASTER_SITES= SOURCEWARE/binutils/releases @@ -82,10 +82,18 @@ BUTARGET= x86_64-unknown-${OPSYS:tl}${OSREL} USES+= iconv .endif -CONFIGURE_ARGS+= --disable-shared \ - --target=${BUTARGET} +CONFIGURE_ARGS+= --target=${BUTARGET} .endif +.if ${FLAVOR} == native +CONFIGURE_ARGS+= --enable-shared +PLIST_SUB+= SHARED='' +.else +CONFIGURE_ARGS+= --disable-shared +PLIST_SUB+= SHARED='@comment' +.endif + + .if ${FLAVOR} == native BUREMOVE= coffdump \ dlltool \ @@ -146,6 +154,9 @@ post-patch: post-install: .if ${FLAVOR} == native + @${STRIP_CMD} \ + ${STAGEDIR}${PREFIX}/lib/lib*.so* \ + ${STAGEDIR}${PREFIX}/lib/bfd-plugins/libdep.so ${INSTALL_DATA} ${WRKSRC}/include/plugin-api.h ${STAGEDIR}${PREFIX}/include/ @${FIND} -ds ${STAGEDIR}${PREFIX}/${CONFIGURE_TARGET} ! -type d | \ ${SED} -e 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} diff --git a/devel/binutils/pkg-plist b/devel/binutils/pkg-plist index 5a4e30936592..7aff2860c5ec 100644 --- a/devel/binutils/pkg-plist +++ b/devel/binutils/pkg-plist @@ -27,12 +27,25 @@ include/dis-asm.h include/sframe-api.h include/sframe.h include/symcat.h -lib/bfd-plugins/libdep.so +%%SHARED%%lib/bfd-plugins/libdep.so +%%SHARED%%lib/libbfd-2.40.so lib/libbfd.a +%%SHARED%%lib/libbfd.so lib/libctf-nobfd.a +%%SHARED%%lib/libctf-nobfd.so +%%SHARED%%lib/libctf-nobfd.so.0 +%%SHARED%%lib/libctf-nobfd.so.0.0.0 lib/libctf.a +%%SHARED%%lib/libctf.so +%%SHARED%%lib/libctf.so.0 +%%SHARED%%lib/libctf.so.0.0.0 +%%SHARED%%lib/libopcodes-2.40.so lib/libopcodes.a +%%SHARED%%lib/libopcodes.so lib/libsframe.a +%%SHARED%%lib/libsframe.so +%%SHARED%%lib/libsframe.so.0 +%%SHARED%%lib/libsframe.so.0.0.0 man/man1/addr2line.1.gz man/man1/ar.1.gz man/man1/as.1.gz