From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0B51E15852A for ; Thu, 15 Aug 2024 23:47:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 564A42BC013; Thu, 15 Aug 2024 23:47:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3D2242BC013 for ; Thu, 15 Aug 2024 23:47:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 71AC2343017 for ; Thu, 15 Aug 2024 23:47:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A76A11EEF for ; Thu, 15 Aug 2024 23:47:01 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1723765582.21f52fa7265f10d9d62df5b9d4194b772e81795b.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/bpf-toolchain/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/bpf-toolchain/bpf-toolchain-14.2.0-r2.ebuild X-VCS-Directories: sys-devel/bpf-toolchain/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 21f52fa7265f10d9d62df5b9d4194b772e81795b X-VCS-Branch: master Date: Thu, 15 Aug 2024 23:47:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fbdd0612-04b4-4163-bf7d-58c7d39dd4d0 X-Archives-Hash: 10cedce53ce58393b7524b73cecb860f commit: 21f52fa7265f10d9d62df5b9d4194b772e81795b Author: Sam James gentoo org> AuthorDate: Thu Aug 15 23:46:12 2024 +0000 Commit: Sam James gentoo org> CommitDate: Thu Aug 15 23:46:22 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21f52fa7 sys-devel/bpf-toolchain: fix stripping like dev-util/mingw64-toolchain does (Revbumped in previous commit.) Signed-off-by: Sam James gentoo.org> sys-devel/bpf-toolchain/bpf-toolchain-14.2.0-r2.ebuild | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0-r2.ebuild b/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0-r2.ebuild index 093dcc4f54dd..ddd76d00070c 100644 --- a/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0-r2.ebuild +++ b/sys-devel/bpf-toolchain/bpf-toolchain-14.2.0-r2.ebuild @@ -41,8 +41,7 @@ LICENSE=" " SLOT="0" KEYWORDS="-* ~amd64" -# TODO: USE=strip from dev-util/mingw64-toolchain? -IUSE="+bin-symlinks custom-cflags" +IUSE="+bin-symlinks custom-cflags +strip" RDEPEND=" dev-libs/gmp:= @@ -194,6 +193,17 @@ src_compile() { # which does not make use of cross-library dependencies: the libdep.a # for the native binutils will do. rm -f ${sysroot}/lib/bfd-plugins/libdep.a || die + + # portage doesn't know the right strip executable to use for CTARGET + # and it can lead to .a mangling, notably with 32bit (breaks toolchain) + dostrip -x ${bpftdir}/{${CTARGET}/lib{,32},lib/gcc/${CTARGET}} + + # ... and instead do it here given this saves ~60MB + if use strip; then + einfo "Stripping ${CTARGET} static libraries ..." + find "${sysroot}"/{,lib/gcc/}${CTARGET} -type f -name '*.a' \ + -exec ${CTARGET}-strip --strip-unneeded {} + || die + fi } src_install() {