toolchain.eclass: avoid libquadmath in stage1-gcc

libquadmath relies on libc presence (sqrt symbols).
When initial toolchain is bootstrapped libc is not
available yet.

The change disables libquadmath for bootstrap cases
when libc is not installed yet. gcc-stage2 still
uses platform defaults for libquadmath.

Reported-by: Andrew Aladjev
Closes: https://bugs.gentoo.org/734820
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
Sergei Trofimovich
2020-07-30 22:17:40 +01:00
parent e09a9c9cc6
commit 590daa6d79

View File

@@ -1030,6 +1030,9 @@ toolchain_src_configure() {
esac
if [[ -n ${needed_libc} ]] ; then
local confgcc_no_libc=( --disable-shared )
# requires libc: bug #734820
tc_version_is_at_least 4.6 && confgcc_no_libc+=( --disable-libquadmath )
# requires libc
tc_version_is_at_least 4.8 && confgcc_no_libc+=( --disable-libatomic )
if ! has_version ${CATEGORY}/${needed_libc} ; then
confgcc+=(