diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-15 02:02:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-15 02:02:03 +0000 |
commit | 16a4365c3b854e62b50726456ddb29bb78fd5038 (patch) | |
tree | 6de11adc70daeb6424485bb16be162d2cb277018 /eclass | |
parent | 59d772d9463f8cf6a145a677bedbf377a0625aff (diff) |
gentoo auto-resync : 15:12:2024 - 02:02:03
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 39357 -> 39355 bytes | |||
-rw-r--r-- | eclass/toolchain.eclass | 46 |
2 files changed, 29 insertions, 17 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex a36e32517c52..c45c90c387a2 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index d72047e891d1..6eef2a0ec03e 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -971,12 +971,16 @@ toolchain_setup_ada() { if ver_test ${ada_bootstrap} -gt ${PV} || [[ -z ${ada_bootstrap} ]] ; then ebegin "Testing fallback dev-lang/ada-bootstrap for Ada" if has_version -b "<dev-lang/ada-bootstrap-${SLOT}" ; then - # TODO: Figure out ada-bootstrap versioning/slots + # Workaround the old scheme + if has_version -b "=dev-lang/ada-bootstrap-0_p2021*" ; then + ada_bootstrap=10 + else + local latest_ada_bootstrap=$(best_version -b "<dev-lang/ada-bootstrap-${SLOT}") + latest_ada_bootstrap="${latest_ada_bootstrap#dev-lang/ada-bootstrap-}" + latest_ada_bootstrap=$(ver_cut 1 ${latest_ada_bootstrap}) + ada_bootstrap="${latest_ada_bootstrap}" + fi - #local latest_ada_bootstrap=$(best_version -b "<dev-lang/ada-bootstrap-${SLOT}") - #latest_ada_bootstrap="${latest_ada_bootstrap#dev-lang/ada-bootstrap-}" - #latest_ada_bootstrap=$(ver_cut 1 ${latest_ada_bootstrap}) - ada_bootstrap="10" ada_bootstrap_type=ada-bootstrap ada_bootstrap_bin_dir="${BROOT}/usr/lib/ada-bootstrap/bin" @@ -1085,19 +1089,26 @@ toolchain_setup_ada() { # Create bin wrappers because not all of the build system respects # GNATBIND or GNATMAKE. - mkdir "${T}"/ada-wrappers || die - local tool - for tool in gnat{,bind,chop,clean,kr,link,ls,make,name,prep} ; do - cat <<-EOF > "${T}"/ada-wrappers/${tool} || die - #!/bin/sh - exec "${ada_bootstrap_bin_dir}"/${CHOST}-${tool} "\$@" - EOF + _toolchain_make_gnat_wrappers() { + mkdir "${T}"/ada-wrappers || die + local tool + for tool in gnat{,bind,chop,clean,kr,link,ls,make,name,prep} ; do + cat <<-EOF > "${T}"/ada-wrappers/${tool} || die + #!/bin/sh + exec "${ada_bootstrap_bin_dir}"/${CHOST}-${tool} "\$@" + EOF + + export "${tool^^}"="${T}"/ada-wrappers/${tool} + done + chmod +x "${T}"/ada-wrappers/gnat{,bind,chop,clean,kr,link,ls,make,name,prep} || die - export "${tool^^}"="${T}"/ada-wrappers/${tool} - done - chmod +x "${T}"/ada-wrappers/gnat{,bind,chop,clean,kr,link,ls,make,name,prep} || die + export PATH="${T}/ada-wrappers:${old_path}" + } + + # Only make the wrappers for native builds. For cross, we can't + # do it as CBUILD vs CHOST will get mixed up then. + ! tc-is-cross-compiler && _toolchain_make_gnat_wrappers - export PATH="${T}/ada-wrappers:${old_path}" export CC="$(tc-getCC) -specs=${T}/ada.spec" } @@ -1635,8 +1646,9 @@ toolchain_src_configure() { [[ ${CTARGET} == *-darwin* ]] && \ confgcc+=( --enable-version-specific-runtime-libs ) + # Linux specifically here for bug #946397. # TODO: amdgcn-amdhsa? - [[ ${CTARGET} == x86_64* ]] && confgcc+=( + [[ ${CTARGET} == x86_64*-*-linux-* ]] && confgcc+=( --enable-offload-defaulted --enable-offload-targets=nvptx-none ) |