aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2022-02-05 19:35:11 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2022-02-05 19:35:11 +0100
commit63338c99d5ee1e5b3b6d4eb99f4ddf438c36917e (patch)
tree90a03a7ea066d247de23c6a0da717a8ef2f5405e
parentcrossdev: don't pick ebuild version from overlay if unmatching KEYWORDS (diff)
downloadcrossdev-63338c99d5ee1e5b3b6d4eb99f4ddf438c36917e.tar.gz
crossdev-63338c99d5ee1e5b3b6d4eb99f4ddf438c36917e.tar.bz2
crossdev-63338c99d5ee1e5b3b6d4eb99f4ddf438c36917e.zip
Add some special riscv sauce. Ugly.20220205
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 <dilfridge@gentoo.org>
-rwxr-xr-xcrossdev32
1 files changed, 32 insertions, 0 deletions
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() {