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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 22504158009 for ; Sat, 4 Mar 2023 02:21:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 354F6E07A5; Sat, 4 Mar 2023 02:21:48 +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 11B35E07A5 for ; Sat, 4 Mar 2023 02:21:47 +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 C70ED335CB4 for ; Sat, 4 Mar 2023 02:21:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0A3958C1 for ; Sat, 4 Mar 2023 02:21:45 +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: <1677896494.97f76fa9e3aeeac6f44dbc979dcddb86ce7e1686.sam@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 97f76fa9e3aeeac6f44dbc979dcddb86ce7e1686 X-VCS-Branch: master Date: Sat, 4 Mar 2023 02:21:45 +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: ae023d4d-80fd-49f7-80f7-25329f118826 X-Archives-Hash: aa2e5b8fd793de05f654feb438a938e1 commit: 97f76fa9e3aeeac6f44dbc979dcddb86ce7e1686 Author: Bart Oldeman calculquebec ca> AuthorDate: Wed Mar 1 17:29:36 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Mar 4 02:21:34 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=97f76fa9 Use gcc --sysroot in rap stage3 post glibc install Since glibc now has non-prefixed filenames in `$EPREFIX/usr/lib64/libc.so`, it picks up non-prefixed `/lib64/libc.so.6` from stage2 gcc, unless we replace its -I, -L, and -B options by --sysroot. Then it will look at the same places as the future stage3 gcc. This avoids issues building binutils, which can't find dlopen in older `/lib64/libc.so.6`, since dlopen used to be in `libdl` instead. The whole logic no longer tests for compiler == gcc, since clang is only used for non-rap on MacOS. Closes: https://bugs.gentoo.org/895240 Signed-off-by: Bart Oldeman calculquebec.ca> Closes: https://github.com/gentoo/prefix/pull/22 Signed-off-by: Sam James gentoo.org> scripts/bootstrap-prefix.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index c82cb4c1a8..f35de28ff8 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -2111,13 +2111,11 @@ bootstrap_stage3() { ) # use the new dynamic linker in place of rpath from now on. RAP_DLINKER=$(echo "${ROOT}"/$(get_libdir)/ld*.so.[0-9] | sed s"!${ROOT}/$(get_libdir)/ld-lsb.*!!") - export LDFLAGS="-L${ROOT}/usr/$(get_libdir) -Wl,--dynamic-linker=${RAP_DLINKER}" - if [[ ${compiler_type} == gcc ]] ; then - # make sure these flags are used even in places that ignore/strip CPPFLAGS/LDFLAGS - export LDFLAGS="-B${ROOT}/usr/$(get_libdir) ${LDFLAGS}" - export CC="gcc ${CPPFLAGS} ${LDFLAGS}" - export CXX="g++ ${CPPFLAGS} ${LDFLAGS}" - fi + export CPPFLAGS="--sysroot=${ROOT}" + export LDFLAGS="-Wl,--dynamic-linker=${RAP_DLINKER}" + # make sure these flags are used even in places that ignore/strip CPPFLAGS/LDFLAGS + export CC="gcc ${CPPFLAGS} ${LDFLAGS}" + export CXX="g++ ${CPPFLAGS} ${LDFLAGS}" BOOTSTRAP_RAP=yes \ pre_emerge_pkgs --nodeps "${pkgs[@]}" || return 1