summaryrefslogtreecommitdiff
path: root/scripts/build/arch/x86.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/x86.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/x86.sh')
-rw-r--r--scripts/build/arch/x86.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/build/arch/x86.sh b/scripts/build/arch/x86.sh
index ca0f08b..0e41d67 100644
--- a/scripts/build/arch/x86.sh
+++ b/scripts/build/arch/x86.sh
@@ -68,3 +68,27 @@ CT_DoArchMultilibTarget ()
echo "${target}"
}
+
+# Adjust target tuple for GLIBC
+CT_DoArchGlibcAdjustTuple() {
+ local target="${1}"
+
+ case "${target}" in
+ # x86 quirk: architecture name is i386, but glibc expects i[4567]86 - to
+ # indicate the desired optimization. If it was a multilib variant of x86_64,
+ # then it targets at least NetBurst a.k.a. i786, but we'll follow the model
+ # above # and set the optimization to i686. Otherwise, replace with the most
+ # conservative choice, i486.
+ i386-*)
+ if [ "${CT_TARGET_ARCH}" = "x86_64" ]; then
+ target=${target/#i386-/i686-}
+ elif [ "${CT_TARGET_ARCH}" != "i386" ]; then
+ target=${target/#i386-/${CT_TARGET_ARCH}-}
+ else
+ target=${target/#i386-/i486-}
+ fi
+ ;;
+ esac
+
+ echo "${target}"
+}