aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-04-10 08:00:10 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-04-10 08:00:10 +0100
commit78d402061875170020c6ad4a29a45296007372e4 (patch)
treee2d2cc3f01e5b380d235f2fd2ed4d3a7f37891cb
parentcrossdev: add USE=mutilib reporting injected for targets (diff)
downloadcrossdev-78d402061875170020c6ad4a29a45296007372e4.tar.gz
crossdev-78d402061875170020c6ad4a29a45296007372e4.tar.bz2
crossdev-78d402061875170020c6ad4a29a45296007372e4.zip
crossdev: unconditionally create /usr/${CTARGET}/{lib,usr/lib}
Copying note as-is here: ``` Create directories usually created by sys-apps/baselayout Why we do that at all: For multilib-aware targets (ppc64, s390x, sparc64, x86_64) Gentoo normally uses libdir=lib64. For crossdev it means /lib and /usr/lib does not get created at all but gcc relies on their presence by refering to =/lib64 as =/usr/lib/../lib64 when builds itself (see https://bugs.gentoo.org/652724) Thus we create non-symlinked layout early. ``` Before the change 'crossdev -t powerpc64le-foo-linux-gnu' failed at gcc-stage2 as: ``` ... \ -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 \ -o ./libgcc_s.so.1.tmp \ ... \ /usr/libexec/gcc/powerpc64le-foo-linux-gnu/ld: cannot find crti.o: No such file or directory access("/usr/powerpc64le-foo-linux-gnu/usr/lib/../lib64/crti.o", R_OK) = -1 ENOENT (No such file or directory) ``` The change adds empty directory '/usr/powerpc64le-foo-linux-gnu/usr/lib' to make ld probing finally find 'crti.o' in $SYSROOT. Reported-by: Luke-Jr Bug: https://bugs.gentoo.org/652724 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rwxr-xr-xcrossdev14
1 files changed, 14 insertions, 0 deletions
diff --git a/crossdev b/crossdev
index b68f821..bb03316 100755
--- a/crossdev
+++ b/crossdev
@@ -1248,6 +1248,20 @@ hr
xmkdir -p "${EPREFIX}"/usr/${CTARGET}
emerge-wrapper --target ${CTARGET} --init || exit 1
+#############################################################
+### Create directories usually created by sys-apps/baselayout
+###
+### Why we do that at all:
+### For multilib-aware targets (ppc64, s390x, sparc64, x86_64) Gentoo
+### normally uses libdir=lib64.
+### For crossdev it means /lib and /usr/lib does not get created at all
+### but gcc relies on their presence by refering to =/lib64 as
+### =/usr/lib/../lib64 when builds itself (see https://bugs.gentoo.org/652724)
+###
+### Thus we create non-symlinked layout early.
+xmkdir -p "${EPREFIX}"/usr/${CTARGET}/lib
+xmkdir -p "${EPREFIX}"/usr/${CTARGET}/usr/lib
+
#################
emerged_with_use() {
local pkg=$1 use=$2