Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] __tls_get_addr compilation issue
@ 2011-12-21 23:46 vbr vbr
  2012-01-17  0:00 ` vbr vbr
  0 siblings, 1 reply; 3+ messages in thread
From: vbr vbr @ 2011-12-21 23:46 UTC (permalink / raw)
  To: buildroot

Hi,

I am seeing an issue while compiling the pcre library (and a few other
packages) with buildroot-2011.08, using an external ct-ng toolchain. Target
arch is x86_64.

x86_64-foo-linux-uclibc/lib/../lib64/libstdc++.so: undefined reference to
`__tls_get_addr'

It seems people usually fix this by adding TLS support, but my config
already enables that:

uClibc config:

$ grep TLS ../crosstool-ng-1.12.3/uClibc-0.9.32.config
UCLIBC_HAS_TLS=y
$ grep THREAD ../crosstool-ng-1.12.3/uClibc-0.9.32.config
# HAS_NO_THREADS is not set
# LINUXTHREADS_OLD is not set
# LINUXTHREADS_NEW is not set
UCLIBC_HAS_THREADS_NATIVE=y
UCLIBC_HAS_THREADS=y
# PTHREADS_DEBUG_SUPPORT is not set

crosstool-ng config:

$ grep THREAD ../crosstool-ng-1.12.3/.config
CT_LIBC_SUPPORT_THREADS_ANY=y
CT_LIBC_SUPPORT_LINUXTHREADS=y
CT_LIBC_SUPPORT_THREADS_NONE=y
CT_THREADS="linuxthreads"
CT_THREADS_LINUXTHREADS=y
# CT_THREADS_NONE is not set

buildroot config:

$ grep THREAD .config
BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS=y
BR2_TOOLCHAIN_HAS_THREADS=y

Any idea how to fix this?

Thanks
Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111221/7ecc8d6f/attachment.html>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] __tls_get_addr compilation issue
  2011-12-21 23:46 [Buildroot] __tls_get_addr compilation issue vbr vbr
@ 2012-01-17  0:00 ` vbr vbr
  2012-01-17 14:45   ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: vbr vbr @ 2012-01-17  0:00 UTC (permalink / raw)
  To: buildroot

In case someone else hits this, I worked around the problem by disabling
tls when compiling gcc. This is from crosstool ng config:

grep disable .config
CT_CC_EXTRA_CONFIG_ARRAY="--disable-tls"

Thanks
Vincent


On Wed, Dec 21, 2011 at 3:46 PM, vbr vbr <vvvg77@gmail.com> wrote:

> Hi,
>
> I am seeing an issue while compiling the pcre library (and a few other
> packages) with buildroot-2011.08, using an external ct-ng toolchain. Target
> arch is x86_64.
>
> x86_64-foo-linux-uclibc/lib/../lib64/libstdc++.so: undefined reference to
> `__tls_get_addr'
>
> It seems people usually fix this by adding TLS support, but my config
> already enables that:
>
> uClibc config:
>
> $ grep TLS ../crosstool-ng-1.12.3/uClibc-0.9.32.config
> UCLIBC_HAS_TLS=y
> $ grep THREAD ../crosstool-ng-1.12.3/uClibc-0.9.32.config
> # HAS_NO_THREADS is not set
> # LINUXTHREADS_OLD is not set
> # LINUXTHREADS_NEW is not set
> UCLIBC_HAS_THREADS_NATIVE=y
> UCLIBC_HAS_THREADS=y
> # PTHREADS_DEBUG_SUPPORT is not set
>
> crosstool-ng config:
>
> $ grep THREAD ../crosstool-ng-1.12.3/.config
> CT_LIBC_SUPPORT_THREADS_ANY=y
> CT_LIBC_SUPPORT_LINUXTHREADS=y
> CT_LIBC_SUPPORT_THREADS_NONE=y
> CT_THREADS="linuxthreads"
> CT_THREADS_LINUXTHREADS=y
> # CT_THREADS_NONE is not set
>
> buildroot config:
>
> $ grep THREAD .config
> BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS=y
> BR2_TOOLCHAIN_HAS_THREADS=y
>
> Any idea how to fix this?
>
> Thanks
> Vincent
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120116/68c4c8a8/attachment.html>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] __tls_get_addr compilation issue
  2012-01-17  0:00 ` vbr vbr
@ 2012-01-17 14:45   ` Peter Korsgaard
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2012-01-17 14:45 UTC (permalink / raw)
  To: buildroot

>>>>> "vbr" == vbr vbr <vvvg77@gmail.com> writes:

 vbr> In case someone else hits this, I worked around the problem by disabling tls
 vbr> when compiling gcc. This is from crosstool ng config:

 vbr> grep disable .config
 vbr> CT_CC_EXTRA_CONFIG_ARRAY="--disable-tls"

Maybe we should make the BR2_GCC_ENABLE_TLS option we have for internal
toolchains available for ctng as well.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-17 14:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 23:46 [Buildroot] __tls_get_addr compilation issue vbr vbr
2012-01-17  0:00 ` vbr vbr
2012-01-17 14:45   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox