Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 675772 Details for
Bug 757381
bootstrap-prefix.sh fails on macOS Big Sur Intel MacBook Pro during installation of app-shells/bash-5.1_rc3
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bootstrap-prefix.sh modifications for stage1/stage2 using clang
bootstrap-prefix.patch (text/plain), 4.90 KB, created by
Jacob Floyd
on 2020-11-29 22:05:48 UTC
(
hide
)
Description:
bootstrap-prefix.sh modifications for stage1/stage2 using clang
Filename:
MIME Type:
Creator:
Jacob Floyd
Created:
2020-11-29 22:05:48 UTC
Size:
4.90 KB
patch
obsolete
>diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh >index 595a0019f3..d6785d69f4 100755 >--- a/scripts/bootstrap-prefix.sh >+++ b/scripts/bootstrap-prefix.sh >@@ -91,6 +91,24 @@ efetch() { > return 0 > } > >+darwin_symlink_sdk() { >+ # setup MacOSX.sdk symlink for GCC/clang, this should probably be >+ # managed using an eselect module in the future >+ rm -f "${ROOT}/MacOSX.sdk" >+ local SDKPATH=$(xcrun --show-sdk-path --sdk macosx) >+ local SDKVERSION=$(xcrun --show-sdk-version --sdk macosx) >+ ( cd ${ROOT} && ln -s "${SDKPATH}" MacOSX.sdk ) >+ einfo "using system sources (${SDKVERSION}) from: ${SDKPATH}" >+} >+ >+darwin_include_paths() { >+ local SDKPATH="${ROOT}/MacOSX.sdk" >+ export C_INCLUDE_PATH="${SDKPATH}/usr/include" >+ >+ # we require command line tools. This allows stage2 to progress. >+ export CPLUS_INCLUDE_PATH="/Library/Developer/CommandLineTools/usr/include/c++/v1:${C_INCLUDE_PATH}" >+} >+ > configure_cflags() { > export CPPFLAGS="-I${ROOT}/tmp/usr/include" > >@@ -241,7 +259,14 @@ configure_toolchain() { > sys-libs/libcxx" > CC=clang > CXX=clang++ >+ # sys-devel/binutils-apple requires sys-libs/tapi, but we >+ # cannot build it first. so, stage2 needs to bootstrap it. >+ #linker="sys-libs/tapi sys-devel/binutils-apple" > linker=sys-devel/binutils-apple >+ if [[ ! -d /usr/include ]]; then >+ darwin_symlink_sdk >+ darwin_include_paths >+ fi > ;; > *"Apple LLVM version "*) > vers=${ccvers#*Apple LLVM version } >@@ -504,13 +529,7 @@ bootstrap_setup() { > esac > > if [[ ${DARWIN_USE_GCC} == 1 ]] ; then >- # setup MacOSX.sdk symlink for GCC, this should probably be >- # managed using an eselect module in the future >- rm -f "${ROOT}"/MacOSX.sdk >- local SDKPATH=$(xcrun --show-sdk-path --sdk macosx) >- ( cd "${ROOT}" && ln -s "${SDKPATH}" MacOSX.sdk ) >- einfo "using system sources from ${SDKPATH}" >- >+ darwin_symlink_sdk > # amend profile, to use gcc one > profile="${profile}/gcc" > fi >@@ -1332,6 +1351,31 @@ bootstrap_libressl() { > https://ftp.openbsd.org/pub/OpenBSD/LibreSSL > } > >+bootstrap_libtapi() { >+ # grab the libtapi headers (which are actually compiled headers) >+ # but link with libtapi.dylib from CommaandLineTools >+ >+ local PN PV A S >+ PN=libtapi >+ PV=1000.10.8_1 >+ rev=${CHOST##*darwin} >+ A=${PN}-${PV}.darwin_${rev}.x86_64.tbz2 >+ einfo "Bootstrapping ${A%-*} (link to system dylib)" >+ >+ efetch "http://packages.macports.org/libtapi/${A}" >+ >+ einfo "Unpacking ${A%-*}" >+ S="${PORTAGE_TMPDIR}/${PN}-${PV}" >+ rm -rf "${S}" >+ mkdir -p "${S}" >+ cd "${S}" >+ bzip2 -dc "${DISTDIR}/${A}" | tar -xf - || return 1 >+ cp -r opt/local/include/tapi "${ROOT}"/tmp/usr/include || return 1 >+ >+ # to link with this lib, pass '-client_name ld' in LDFLAGS >+ ln -s /Library/Developer/CommandLineTools/usr/lib/libtapi.dylib "${ROOT}"/tmp/usr/lib >+} >+ > bootstrap_stage_host_gentoo() { > if ! is-rap ; then > einfo "Shortcut only supports prefix-standalone, but we are bootstrapping" >@@ -1736,8 +1780,8 @@ bootstrap_stage2() { > [[ ${CHOST} == *-solaris* ]] && echo "=dev-libs/libffi-3.3_rc0" \ > >> "${ROOT}"/tmp/etc/portage/package.mask > >- # unlock GCC on Darwin for DARWIN_USE_GCC bootstraps >- if [[ ${DARWIN_USE_GCC} == 1 ]] ; then >+ # unlock Darwin builds for GCC and clang bootstraps >+ if [[ -d "${ROOT}/MacOSX.sdk" ]] ; then > rm -f "${ROOT}"/tmp/MacOSX.sdk > ( cd "${ROOT}"/tmp && ln -s ../MacOSX.sdk ) > fi >@@ -1746,8 +1790,26 @@ bootstrap_stage2() { > # unless we only build the buildtool, bug #603012 > echo "dev-util/cmake -server" >> "${ROOT}"/tmp/etc/portage/package.use > >+ # rhash (dep of cmake) configure can't find the openssl/libressl. >+ # ssl use flag allows RHash to "use optimized algorithms" >+ # but RHash will work fine without, so disable during bootstrap. >+ echo "app-crypt/rhash -ssl" >> "${ROOT}"/tmp/etc/portage/package.use >+ > emerge_pkgs --nodeps "${pkgs[@]}" || return 1 > >+ if [[ ${CHOST} == *-darwin* ]]; then >+ # libtapi.dylib is needed to build the binutils-apple linker, >+ # but building sys-libs/tapi requires llvm to be installed >+ # because it uses llvm.eclass which checks for which version >+ # of llvm is installed. Also, building libtapi includes >+ # re-building the sources of llvm & clang to get some internal >+ # binaries that don't get installed, but we haven't installed >+ # the llvm deps yet. So, we can't install tapi via portage yet. >+ [[ ${DARWIN_USE_GCC} == 1 ]] \ >+ || [[ -f "${ROOT}"/tmp/usr/lib/libtapi.dylib ]] \ >+ || (bootstrap_libtapi) || return 1 >+ fi >+ > # Debian multiarch supported by RAP needs ld to support sysroot. > EXTRA_ECONF=$(rapx --with-sysroot=/) \ > emerge_pkgs --nodeps ${linker} || return 1 >@@ -2836,7 +2898,7 @@ EOF > export CHOST=$(portageq envvar CHOST) > > # after stage1 and stage2 we should have a bash of our own, which >- # is preferably over the host-provided one, because we know it can >+ # is preferable over the host-provided one, because we know it can > # deal with the bash-constructs we use in stage3 and onwards > hash -r >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 757381
:
675601
|
675631
|
675703
|
675736
|
675748
| 675772