diff options
author | Dmitry Pankratov <dp@ubiquitech.com> | 2016-06-18 14:02:15 (GMT) |
---|---|---|
committer | Dmitry Pankratov <dp@ubiquitech.com> | 2016-06-18 14:02:15 (GMT) |
commit | 91b8280e8c9458e81fc94d1f9983f2a642ebb7a8 (patch) | |
tree | 9279482c6f4e8a28420c2f1adf19dcb084dc9f04 /scripts/build/arch/sparc.sh | |
parent | f6d8dc44111c6e96706eed8b0ae0483e2fb63856 (diff) | |
parent | 6e7c61650a39a67ee02ed58c11d64c94c436bb33 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'scripts/build/arch/sparc.sh')
-rw-r--r-- | scripts/build/arch/sparc.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/build/arch/sparc.sh b/scripts/build/arch/sparc.sh index e3e7491..2d3baa3 100644 --- a/scripts/build/arch/sparc.sh +++ b/scripts/build/arch/sparc.sh @@ -2,4 +2,28 @@ CT_DoArchTupleValues() { # That's the only thing to override CT_TARGET_ARCH="sparc${target_bits_64}${CT_ARCH_SUFFIX}" + + # By default, sparc64-*-linux is configured with -mcpu=v9. However, + # according to https://sourceware.org/ml/libc-alpha/2005-12/msg00027.html, + # "There is no Linux sparc64 port that runs on non-UltraSPARC-I+ ISA CPUs." + # There is a patch that would change the default to -mcpu=ultrasparc for + # sparc64-*-linux configuration: https://patchwork.ozlabs.org/patch/409424/ + # but that patch has not been integrated (yet). One concern raised about + # this patch was that -mcpu=ultrasparc can suboptimally schedule instructions + # for newer SPARC CPUs. So, override to -mcpu=ultrasparc and warn the user. + if [ "${CT_KERNEL}" = "linux" -a "${CT_ARCH_64}" = "y" -a -z "${CT_ARCH_CPU}" ]; then + CT_DoLog WARN "Setting CPU to UltraSPARC-I for sparc64-linux. Set CT_ARCH_CPU if a different CPU is desired." + CT_ARCH_WITH_CPU="--with-cpu=ultrasparc" + fi +} + +#------------------------------------------------------------------------------ +# Get multilib architecture-specific target +# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple" +CT_DoArchMultilibTarget () +{ + local target="${1}"; shift + local -a multi_flags=( "$@" ) + + echo "${target}" } |