mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-30 08:03:59 +00:00
Add --with-cpu= on 32-bit SPARC
... if building for GLIBC 2.31+. Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
2ae68d9150
commit
8606251585
@ -35,11 +35,13 @@ config GLIBC_DEP_BINUTILS
|
|||||||
select BINUTILS_REQUIRE_2_25_or_later if GLIBC_2_26_or_later
|
select BINUTILS_REQUIRE_2_25_or_later if GLIBC_2_26_or_later
|
||||||
select BINUTILS_REQUIRE_older_than_2_30 if GLIBC_older_than_2_26 && ARCH_ARM && ARCH_64
|
select BINUTILS_REQUIRE_older_than_2_30 if GLIBC_older_than_2_26 && ARCH_ARM && ARCH_64
|
||||||
|
|
||||||
|
# Glibc 2.26 requires GCC4.9 or newer
|
||||||
# Glibc 2.29 requires GCC5+ or, for ppc64le, GCC6.2+. We only support the latest
|
# Glibc 2.29 requires GCC5+ or, for ppc64le, GCC6.2+. We only support the latest
|
||||||
# release on GCC6 branch, so just assume it is newer than 6.2
|
# release on GCC6 branch, so just assume it is newer than 6.2
|
||||||
# Glibc 2.30 uncondtionally requires GCC 6.2+
|
# Glibc 2.30 uncondtionally requires GCC 6.2+
|
||||||
config GLIBC_DEP_GCC
|
config GLIBC_DEP_GCC
|
||||||
def_bool y
|
def_bool y
|
||||||
|
select GCC_REQUIRE_4_9_or_later if GLIBC_2_26_or_later
|
||||||
select GCC_REQUIRE_5_or_later if GLIBC_2_29_or_later
|
select GCC_REQUIRE_5_or_later if GLIBC_2_29_or_later
|
||||||
select GCC_REQUIRE_6_or_later if GLIBC_2_29_or_later && ARCH_POWERPC && ARCH_64 && ARCH_LE
|
select GCC_REQUIRE_6_or_later if GLIBC_2_29_or_later && ARCH_POWERPC && ARCH_64 && ARCH_LE
|
||||||
select GCC_REQUIRE_6_or_later if GLIBC_2_30_or_later
|
select GCC_REQUIRE_6_or_later if GLIBC_2_30_or_later
|
||||||
@ -64,9 +66,11 @@ config GLIBC_DEP_MAKE_4_0
|
|||||||
select MAKE_REQUIRE_4_0_or_later
|
select MAKE_REQUIRE_4_0_or_later
|
||||||
select MAKE_GNUMAKE_SYMLINK # Override old host make in .build/tools/bin
|
select MAKE_GNUMAKE_SYMLINK # Override old host make in .build/tools/bin
|
||||||
|
|
||||||
config GLIBC_DEP_GCC
|
# Glibc 2.31 removed support for pre-v8 SPARC in 32-bit mode (64-bit mode always
|
||||||
|
# required UltraSPARC)
|
||||||
|
config GLIBC_SPARC_ALLOW_V7
|
||||||
def_bool y
|
def_bool y
|
||||||
select GCC_REQUIRE_4_9_or_later if GLIBC_2_26_or_later
|
depends on GLIBC_2_30_or_older
|
||||||
|
|
||||||
config THREADS
|
config THREADS
|
||||||
default "nptl"
|
default "nptl"
|
||||||
|
@ -3,21 +3,32 @@ CT_DoArchTupleValues() {
|
|||||||
# That's the only thing to override
|
# That's the only thing to override
|
||||||
CT_TARGET_ARCH="sparc${target_bits_64}${CT_ARCH_SUFFIX}"
|
CT_TARGET_ARCH="sparc${target_bits_64}${CT_ARCH_SUFFIX}"
|
||||||
|
|
||||||
# By default, sparc64-*-linux is configured with -mcpu=v9. However,
|
if [ "${CT_KERNEL}" = "linux" -a -z "${CT_ARCH_CPU}" ]; then
|
||||||
# according to https://sourceware.org/ml/libc-alpha/2005-12/msg00027.html,
|
if [ "${CT_ARCH_64}" = "y" ]; then
|
||||||
# "There is no Linux sparc64 port that runs on non-UltraSPARC-I+ ISA CPUs."
|
# By default, sparc64-*-linux is configured with -mcpu=v9. However,
|
||||||
# There is a patch that would change the default to -mcpu=ultrasparc for
|
# according to https://sourceware.org/ml/libc-alpha/2005-12/msg00027.html,
|
||||||
# sparc64-*-linux configuration: https://patchwork.ozlabs.org/patch/409424/
|
# "There is no Linux sparc64 port that runs on non-UltraSPARC-I+ ISA CPUs."
|
||||||
# but that patch has not been integrated (yet). One concern raised about
|
# There is a patch that would change the default to -mcpu=ultrasparc for
|
||||||
# this patch was that -mcpu=ultrasparc can suboptimally schedule instructions
|
# sparc64-*-linux configuration: https://patchwork.ozlabs.org/patch/409424/
|
||||||
# for newer SPARC CPUs. So, override to -mcpu=ultrasparc and warn the user.
|
# but that patch has not been integrated (yet). One concern raised about
|
||||||
if [ "${CT_KERNEL}" = "linux" -a "${CT_ARCH_64}" = "y" -a -z "${CT_ARCH_CPU}" ]; then
|
# this patch was that -mcpu=ultrasparc can suboptimally schedule instructions
|
||||||
CT_DoLog WARN "Setting CPU to UltraSPARC-I for sparc64-linux. Set CT_ARCH_CPU if a different CPU is desired."
|
# for newer SPARC CPUs. So, override to -mcpu=ultrasparc and warn the user.
|
||||||
CT_ARCH_WITH_CPU="--with-cpu=ultrasparc"
|
CT_DoLog WARN "Setting CPU to UltraSPARC-I for sparc64-linux. Set CT_ARCH_CPU if a different CPU is desired."
|
||||||
if [ -n "${CT_ARCH_SUPPORTS_WITH_32_64}" -a -n "${CT_MULTILIB}" ]; then
|
CT_ARCH_WITH_CPU="--with-cpu=ultrasparc"
|
||||||
CT_ARCH_WITH_CPU_32="--with-cpu-32=ultrasparc"
|
if [ -n "${CT_ARCH_SUPPORTS_WITH_32_64}" -a -n "${CT_MULTILIB}" ]; then
|
||||||
CT_ARCH_WITH_CPU_64="--with-cpu-64=ultrasparc"
|
CT_ARCH_WITH_CPU_32="--with-cpu-32=ultrasparc"
|
||||||
fi
|
CT_ARCH_WITH_CPU_64="--with-cpu-64=ultrasparc"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Similarly, sparc-*-linux defaults to v7. GLIBC 2.31 started to reject
|
||||||
|
# pre-v8 configurations with 2.31, and default v8 fails a subsequent test for
|
||||||
|
# using atomics (which are presumably, only available on some v8 CPUs).
|
||||||
|
# Therefore, default to v9.
|
||||||
|
if [ -z "${CT_GLIBC_SPARC_ALLOW_V7}" ]; then
|
||||||
|
CT_DoLog WARN "Setting CPU to V9 for sparc-linux. Set CT_ARCH_CPU if a different CPU is desired."
|
||||||
|
CT_ARCH_WITH_CPU="--with-cpu=v9"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user