From a5bad11c8ec1f53b4f3e3d229d792564961f5b3c Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Tue, 18 Mar 2008 00:58:04 +0200 Subject: [PATCH] glibc: Improved tls related cross-compile support for sparc64 --- base/glibc/glibc.conf | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/base/glibc/glibc.conf b/base/glibc/glibc.conf index 7c1123088..61dfe9a14 100644 --- a/base/glibc/glibc.conf +++ b/base/glibc/glibc.conf @@ -64,10 +64,22 @@ glibc_addons="ports" # ckeck whether to enable nptl if supported by the architecture if [ $SDECFG_PKG_GLIBC_TLS = 1 ]; then var_append glibc_addons "," "nptl" - var_append extraconfopt " " "--with-tls" - var_append extraconfopt " " "--with-__thread" if ! atstage native ; then + # tls config.cache tweaks for toolchain stage + if atstage toolchain ; then + case "$arch" in + sparc64) + tls_arch=sparc64 + ;; + esac + var_append configcache ' ' "libc_cv_${tls_arch}_tls=yes" + else + # extra configure options for cross stage + var_append extraconfopt " " "--with-tls" + var_append extraconfopt " " "--with-__thread" + fi + # tls config.cache tweaks for toolchain and cross stage var_append configcache ' ' "libc_cv_forced_unwind=yes" var_append configcache ' ' "libc_cv_c_cleanup=yes" fi