mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 08:56:58 +02:00
eclass/toolchain: Sync with Gentoo
It's from Gentoo commit a7c27596827072f586dc07e6d53531ecb2c7cd6e.
This commit is contained in:
parent
5d71c9c780
commit
cab39eabfa
@ -288,6 +288,13 @@ BDEPEND="
|
|||||||
)"
|
)"
|
||||||
DEPEND="${RDEPEND}"
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
|
if [[ ${PN} == gcc && ${PV} == *_p* ]] ; then
|
||||||
|
# Snapshots don't contain info pages.
|
||||||
|
# If they start to, adjust gcc_cv_prog_makeinfo_modern logic in toolchain_src_configure.
|
||||||
|
# Needed unless/until https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106899 is fixed
|
||||||
|
BDEPEND+=" sys-apps/texinfo"
|
||||||
|
fi
|
||||||
|
|
||||||
if tc_has_feature gcj ; then
|
if tc_has_feature gcj ; then
|
||||||
DEPEND+="
|
DEPEND+="
|
||||||
gcj? (
|
gcj? (
|
||||||
@ -324,11 +331,19 @@ if tc_has_feature zstd ; then
|
|||||||
RDEPEND+=" zstd? ( app-arch/zstd:= )"
|
RDEPEND+=" zstd? ( app-arch/zstd:= )"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if tc_has_feature valgrind; then
|
if tc_has_feature valgrind ; then
|
||||||
BDEPEND+=" valgrind? ( dev-util/valgrind )"
|
BDEPEND+=" valgrind? ( dev-util/valgrind )"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if tc_version_is_at_least 12.0 ; then
|
# TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler
|
||||||
|
# supports Ada.
|
||||||
|
if tc_has_feature ada ; then
|
||||||
|
BDEPEND+=" ada? ( || ( sys-devel/gcc[ada] dev-lang/gnat-gpl[ada] ) )"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler
|
||||||
|
# supports D.
|
||||||
|
if tc_has_feature d && tc_version_is_at_least 12.0 ; then
|
||||||
# D in 12+ is self-hosting and needs D to bootstrap.
|
# D in 12+ is self-hosting and needs D to bootstrap.
|
||||||
# TODO: package some binary we can use, like for Ada
|
# TODO: package some binary we can use, like for Ada
|
||||||
# bug #840182
|
# bug #840182
|
||||||
@ -1187,8 +1202,6 @@ toolchain_src_configure() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Convert armv6m to armv6-m
|
|
||||||
[[ ${arm_arch} == armv6m ]] && arm_arch=armv6-m
|
|
||||||
# Convert armv7{a,r,m} to armv7-{a,r,m}
|
# Convert armv7{a,r,m} to armv7-{a,r,m}
|
||||||
[[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
|
[[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
|
||||||
# See if this is a valid --with-arch flag
|
# See if this is a valid --with-arch flag
|
||||||
@ -1213,6 +1226,17 @@ toolchain_src_configure() {
|
|||||||
armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;;
|
armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If multilib is used, make the compiler build multilibs
|
||||||
|
# for A or R and M architecture profiles. Do this only
|
||||||
|
# when no specific arch/mode/float is specified, e.g.
|
||||||
|
# for target arm-none-eabi, since doing this is
|
||||||
|
# incompatible with --with-arch/cpu/float/fpu.
|
||||||
|
if is_multilib && [[ ${arm_arch} == arm ]] && \
|
||||||
|
tc_version_is_at_least 7.1
|
||||||
|
then
|
||||||
|
confgcc+=( --with-multilib-list=aprofile,rmprofile )
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
mips)
|
mips)
|
||||||
# Add --with-abi flags to set default ABI
|
# Add --with-abi flags to set default ABI
|
||||||
@ -1408,9 +1432,22 @@ toolchain_src_configure() {
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Disable gcc info regeneration -- it ships with generated info pages
|
if [[ ${PV} != *_p* && -f "${S}"/gcc/doc/gcc.info ]] ; then
|
||||||
# already. Our custom version/urls/etc... trigger it. bug #464008
|
# Disable gcc info regeneration -- it ships with generated info pages
|
||||||
export gcc_cv_prog_makeinfo_modern=no
|
# already. Our custom version/urls/etc... trigger it. bug #464008
|
||||||
|
export gcc_cv_prog_makeinfo_modern=no
|
||||||
|
else
|
||||||
|
# Allow a fallback so we don't accidentally install no docs
|
||||||
|
# bug #834845
|
||||||
|
ewarn "No pre-generated info pages in tarball. Allowing regeneration with texinfo..."
|
||||||
|
|
||||||
|
if [[ ${PV} == *_p* && -f "${S}"/gcc/doc/gcc.info ]] ; then
|
||||||
|
# Safeguard against https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106899 being fixed
|
||||||
|
# without corresponding ebuild changes.
|
||||||
|
eqawarn "Snapshot release with pre-generated info pages found!"
|
||||||
|
eqawarn "The BDEPEND in the ebuild should be updated to drop texinfo."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Do not let the X detection get in our way. We know things can be found
|
# Do not let the X detection get in our way. We know things can be found
|
||||||
# via system paths, so no need to hardcode things that'll break multilib.
|
# via system paths, so no need to hardcode things that'll break multilib.
|
||||||
|
Loading…
Reference in New Issue
Block a user