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 1D5D715808B for ; Fri, 11 Feb 2022 22:54:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 595B2E086C; Fri, 11 Feb 2022 22:53:59 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 40BB8E086C for ; Fri, 11 Feb 2022 22:53:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 606A3342ABF for ; Fri, 11 Feb 2022 22:53:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E3D81250 for ; Fri, 11 Feb 2022 22:53:56 +0000 (UTC) From: "Andreas K. Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" Message-ID: <1644086111.63338c99d5ee1e5b3b6d4eb99f4ddf438c36917e.dilfridge@gentoo> Subject: [gentoo-commits] proj/crossdev:master commit in: / X-VCS-Repository: proj/crossdev X-VCS-Files: crossdev X-VCS-Directories: / X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: 63338c99d5ee1e5b3b6d4eb99f4ddf438c36917e X-VCS-Branch: master Date: Fri, 11 Feb 2022 22:53:56 +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: ba5dcfa5-6a91-44ae-a4f2-a97965b400fa X-Archives-Hash: 323a25a1b06dc1b9f9584f89c6103c0d commit: 63338c99d5ee1e5b3b6d4eb99f4ddf438c36917e Author: Andreas K. Hüttel gentoo org> AuthorDate: Sat Feb 5 18:35:11 2022 +0000 Commit: Andreas K. Hüttel gentoo org> CommitDate: Sat Feb 5 18:35:11 2022 +0000 URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=63338c99 Add some special riscv sauce. Ugly. This is necessary since * for glibc, the "fallback" libdir for 64bit is lib64 * for gcc, the "fallback" libdir for 64bit is lib By providing the full multilib libdirs and a compatibility symlink as in baselayout, the pieces fit together again. riscv32 is kinda not affected since both gcc and glibc use lib (NOT lib32, as in the multilib libdirs). Signed-off-by: Andreas K. Hüttel gentoo.org> crossdev | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/crossdev b/crossdev index 287fd53..e2e01e8 100755 --- a/crossdev +++ b/crossdev @@ -1434,6 +1434,38 @@ emerge-wrapper --target ${CTARGET} --init || exit 1 ### Thus we create non-symlinked layout early. xmkdir -p "${EPREFIX}"/usr/${CTARGET}/lib xmkdir -p "${EPREFIX}"/usr/${CTARGET}/usr/lib +### +### We need some special riscv sauce here similar as in baselayout. Ugly. +### step 1: set up all multilib libdirs +### step 2: set up the compat symlink of the default abi for non-multilib +case ${CTARGET} in + riscv*) + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/lib64 + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/lib64/lp64 + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/lib64/lp64d + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/usr/lib64 + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/usr/lib64/lp64 + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/usr/lib64/lp64d + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/lib32 + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/lib32/ilp32 + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/lib32/ilp32d + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/usr/lib32 + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/usr/lib32/ilp32 + xmkdir -p "${EPREFIX}"/usr/${CTARGET}/usr/lib32/ilp32d + ;;& + riscv64*) + rmdir "${EPREFIX}"/usr/${CTARGET}/lib64/${DEFAULT_ABI} + ln -s . "${EPREFIX}"/usr/${CTARGET}/lib64/${DEFAULT_ABI} + rmdir "${EPREFIX}"/usr/${CTARGET}/usr/lib64/${DEFAULT_ABI} + ln -s . "${EPREFIX}"/usr/${CTARGET}/usr/lib64/${DEFAULT_ABI} + ;; + riscv32*) + rmdir "${EPREFIX}"/usr/${CTARGET}/lib32/${DEFAULT_ABI} + ln -s ../lib "${EPREFIX}"/usr/${CTARGET}/lib32/${DEFAULT_ABI} + rmdir "${EPREFIX}"/usr/${CTARGET}/usr/lib32/${DEFAULT_ABI} + ln -s ../lib "${EPREFIX}"/usr/${CTARGET}/usr/lib32/${DEFAULT_ABI} + ;; +esac ################# emerged_with_use() {