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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 888D91382C5 for ; Tue, 10 Apr 2018 07:15:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 775EBE08E2; Tue, 10 Apr 2018 07:15:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 50BAEE08E2 for ; Tue, 10 Apr 2018 07:15:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 33CB9335C59 for ; Tue, 10 Apr 2018 07:15:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E8076274 for ; Tue, 10 Apr 2018 07:15:19 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1523343610.78d402061875170020c6ad4a29a45296007372e4.slyfox@gentoo> Subject: [gentoo-commits] proj/crossdev:master commit in: / X-VCS-Repository: proj/crossdev X-VCS-Files: crossdev X-VCS-Directories: / X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 78d402061875170020c6ad4a29a45296007372e4 X-VCS-Branch: master Date: Tue, 10 Apr 2018 07:15:19 +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-Archives-Salt: b2c3fd8e-27bc-41bb-b93e-a7cb4af66179 X-Archives-Hash: 17e2b880058fd33001e8f1cecae819e9 commit: 78d402061875170020c6ad4a29a45296007372e4 Author: Sergei Trofimovich gentoo org> AuthorDate: Tue Apr 10 07:00:10 2018 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Tue Apr 10 07:00:10 2018 +0000 URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=78d40206 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 gentoo.org> crossdev | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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