diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-10-08 04:26:34 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-10-08 04:26:34 +0100 |
commit | 325837835fc86686829aaa6acace3d3c06c74cea (patch) | |
tree | 6cc31680e4ce26ab26e863fd7b72d0ffe2d9366f /eclass | |
parent | 7ad61ca2bfc8f8da08d2fb3085e4333dcccb0a64 (diff) |
gentoo auto-resync : 08:10:2024 - 04:26:34
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 39750 -> 39742 bytes | |||
-rw-r--r-- | eclass/ruby-utils.eclass | 4 | ||||
-rw-r--r-- | eclass/toolchain.eclass | 44 |
3 files changed, 38 insertions, 10 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex eb65977f68ed..fee552855a8f 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass index 48a25114b396..81bda3abfb36 100644 --- a/eclass/ruby-utils.eclass +++ b/eclass/ruby-utils.eclass @@ -36,10 +36,10 @@ esac # provide for a better first installation experience. # All stable RUBY_TARGETS -RUBY_TARGETS_PREFERENCE="ruby31 " +RUBY_TARGETS_PREFERENCE="ruby32 ruby31 " # All other active ruby targets -RUBY_TARGETS_PREFERENCE+="ruby32 ruby33" +RUBY_TARGETS_PREFERENCE+="ruby33" _ruby_implementation_depend() { local rubypn= diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 5b978f6871db..34f595bcd1bc 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1000,8 +1000,17 @@ toolchain_setup_ada() { # Determine the most suitable GDC (D compiler) for bootstrapping # and setup the environment for building. toolchain_setup_d() { - local latest_gcc=$(best_version -b "sys-devel/gcc") - latest_gcc="${latest_gcc#sys-devel/gcc-}" + local gcc_pkg gcc_bin_base + if tc-is-cross-compiler ; then + gcc_pkg=cross-${CHOST}/gcc + gcc_bin_base=${BROOT}/usr/${CBUILD}/${CHOST}/gcc-bin + else + gcc_pkg=sys-devel/gcc + gcc_bin_base=${BROOT}/usr/${CHOST}/gcc-bin + fi + + local latest_gcc=$(best_version -b "${gcc_pkg}") + latest_gcc="${latest_gcc#${gcc_pkg}-}" latest_gcc=$(ver_cut 1 ${latest_gcc}) local d_bootstrap @@ -1011,10 +1020,10 @@ toolchain_setup_d() { # 2) Iterate downwards from the version being built; # 3) Iterate upwards from the version being built to the greatest version installed. for d_candidate in ${SLOT} $(seq $((${SLOT} - 1)) -1 10) $(seq $((${SLOT} + 1)) ${latest_gcc}) ; do - has_version -b "sys-devel/gcc:${d_candidate}" || continue + has_version -b "${gcc_pkg}:${d_candidate}" || continue - ebegin "Testing sys-devel/gcc:${d_candidate} for D" - if has_version -b "sys-devel/gcc:${d_candidate}[d(-)]" ; then + ebegin "Testing ${gcc_pkg}:${d_candidate} for D" + if has_version -b "${gcc_pkg}:${d_candidate}[d(-)]" ; then d_bootstrap=${d_candidate} eend 0 @@ -1023,9 +1032,24 @@ toolchain_setup_d() { eend 1 done - if [[ -n ${d_bootstrap} ]] ; then - export GDC="${BROOT}/usr/${CTARGET}/gcc-bin/${d_bootstrap}/gdc" + if [[ -z ${d_bootstrap} ]] ; then + if tc-is-cross-compiler ; then + # We can't add cross-${CHOST}/gcc[d] to BDEPEND but we can + # print a useful message to the user. + eerror "No ${gcc_pkg}[d] was found installed." + eerror "When cross-compiling GDC a bootstrap GDC is required." + eerror "Either disable the d USE flag or add:" + eerror "" + eerror " ${gcc_pkg} d" + eerror "" + eerror "In your package.use and re-emerge it." + eerror "" + fi + + die "Did not find any appropriate GDC compiler installed" fi + + export GDC=${gcc_bin_base}/${d_bootstrap}/${CHOST}-gdc } #---->> src_configure <<---- @@ -1120,9 +1144,12 @@ toolchain_src_configure() { _tc_use_if_iuse ada } + _need_d_bootstrap() { + _tc_use_if_iuse d && [[ ${GCCMAJOR} -ge 12 ]] + } _need_ada_bootstrap_mangling && toolchain_setup_ada - _tc_use_if_iuse d && toolchain_setup_d + _need_d_bootstrap && toolchain_setup_d confgcc+=( --enable-languages=${GCC_LANG} ) @@ -1948,6 +1975,7 @@ gcc_do_filter_flags() { CFLAGS="-O2 -pipe" FFLAGS=${CFLAGS} FCFLAGS=${CFLAGS} + GDCFLAGS=${CFLAGS} # "hppa2.0-unknown-linux-gnu" -> hppa2_0_unknown_linux_gnu local VAR="CFLAGS_"${CTARGET//[-.]/_} |