From 48895bf167d0198a935c933784a7492e2042209a 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 0c8c577d8..004908496 100644 --- a/base/glibc/glibc.conf +++ b/base/glibc/glibc.conf @@ -62,10 +62,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