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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0AB361581F3 for ; Sat, 30 Nov 2024 13:09:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B892E07A5; Sat, 30 Nov 2024 13:09:26 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 pigeon.gentoo.org (Postfix) with ESMTPS id CD3C0E07A5 for ; Sat, 30 Nov 2024 13:09:24 +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 96DF5342FDB for ; Sat, 30 Nov 2024 13:09:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F259816DA for ; Sat, 30 Nov 2024 13:09:21 +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: <1732972142.52a39b64a029c40995c6490a307f0c51e9897f2b.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 52a39b64a029c40995c6490a307f0c51e9897f2b X-VCS-Branch: master Date: Sat, 30 Nov 2024 13:09:21 +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: cdfe5c30-fba4-4511-aa57-818e8261675b X-Archives-Hash: 420936707a09faf0c12581347169809e commit: 52a39b64a029c40995c6490a307f0c51e9897f2b Author: Sam James gentoo org> AuthorDate: Sat Nov 30 12:49:09 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sat Nov 30 13:09:02 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52a39b64 toolchain.eclass: move nvptx files to accel/ subdir This is what Fedora does and it seems to have fixed the issue I was having with needing to manually move libgomp.{a,spec} and then after that, getting undefined references to gomp_nvptx_main (which I assume is because the plugin wasn't being loaded). Bug: https://bugs.gentoo.org/945296 Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index eac300438da5..d41d7c3737a1 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -2698,6 +2698,24 @@ gcc_movelibs() { fix_libtool_libdir_paths "${LIBPATH}/${MULTIDIR}" done + # Without this, we end up either unable to find the libgomp spec/archive, or + # we underlink and can't find gomp_nvptx_main (presumably because we can't find the plugin) + # https://src.fedoraproject.org/rpms/gcc/blob/02c34dfa3627ef05d676d30e152a66e77b58529b/f/gcc.spec#_1445 + if [[ ${CTARGET} == nvptx* ]] && has_version ${CATEGORY}/${PN} ; then + rm -rf "${ED}"/usr/libexec/gcc/nvptx-none/${GCCMAJOR}/install-tools + rm -rf "${ED}"/usr/libexec/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/{install-tools,plugin,cc1,cc1plus,f951} + rm -rf "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/{install-tools,plugin} + rm -rf "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/{install-tools,plugin,include-fixed} + mv "${ED}"/usr/nvptx-none/lib/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/ + mv "${ED}"/usr/nvptx-none/lib/mgomp/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/ + mv "${ED}"/usr/nvptx-none/lib/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mptx-3.1/ + mv "${ED}"/usr/nvptx-none/lib/mgomp/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/mptx-3.1/ + mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/*.a "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/ || die + mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mgomp/*.a "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/ || die + mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mptx-3.1/*.a "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mptx-3.1/ || die + mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mgomp/mptx-3.1/*.a "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/mptx-3.1/ || die + fi + # We remove directories separately to avoid this case: # mv SRC/lib/../lib/*.o DEST # rmdir SRC/lib/../lib/