summaryrefslogtreecommitdiff
path: root/scripts/build/arch/sparc.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2016-04-02 07:12:41 (GMT)
committerAlexey Neyman <stilor@att.net>2016-08-23 18:00:27 (GMT)
commit3ebc5d0c1e72e95f05a02818a3e2c642663d4b74 (patch)
treec9099111b7741479d3e4f4df9d342828a682a9db /scripts/build/arch/sparc.sh
parent4ee22d66a849123c06812736dd1472840aad5823 (diff)
libc/*.sh: Deprecate libc_check_config step.
This step was only used in uClibc. However, with upcoming multilib, the config management will have to be done for each variant differently, anyway. uClibc was the only user of libc_check_config step, as well as CT_CONFIG_DIR directory. Retire these. Two other clean-ups in uClibc.sh: - KERNEL_HEADERS check seems to be bogus, this config option is not present even in 0.9.30 - which is not supported already. - SHARED_LIB_LOADER_PREFIX was renamed to MULTILIB_DIR in 0.9.31, according to ChangeLog - and MULTILIB_DIR is passed from command line instead. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/arch/sparc.sh')
-rw-r--r--scripts/build/arch/sparc.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/build/arch/sparc.sh b/scripts/build/arch/sparc.sh
index 2d3baa3..189cebe 100644
--- a/scripts/build/arch/sparc.sh
+++ b/scripts/build/arch/sparc.sh
@@ -25,5 +25,39 @@ CT_DoArchMultilibTarget ()
local target="${1}"; shift
local -a multi_flags=( "$@" )
+ local m32=false
+ local m64=false
+
+ for m in "${multi_flags[@]}"; do
+ case "$m" in
+ -m32) m32=true ;;
+ -m64) m64=true ;;
+ esac
+ done
+
+ # Fix up bitness
+ case "${target}" in
+ sparc-*) $m64 && target=${target/#sparc-/sparc64-} ;;
+ sparc64-*) $m32 && target=${target/#sparc64-/sparc-} ;;
+ esac
+
+ echo "${target}"
+}
+
+# Special tuple adjustment for glibc.
+CT_DoArchGlibcAdjustTuple() {
+ local target="${1}"
+
+ case "${target}" in
+ # SPARC quirk: glibc 2.23 and newer dropped support for SPARCv8 and
+ # earlier (corresponding pthread barrier code is missing). Until this
+ # support is reintroduced, configure as sparcv9.
+ sparc-*)
+ if [ "${CT_LIBC_GLIBC_2_23_or_later}" = y ]; then
+ target=${target/#sparc-/sparcv9-}
+ fi
+ ;;
+ esac
+
echo "${target}"
}