| Summary: | undefined reference to `__builtin_thread_pointer' | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | reddi <reddy.mrp> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | buildroot, nrubinstein, reddy.mrp |
| Priority: | P5 | ||
| Version: | 2014.08 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: |
attached config file
attached config file |
||
Hi, please help me out how to resolve this issue. Thanks R See http://buildroot.org/downloads/manual/manual.html#reporting-bugs. If you don't provide your Buildroot .config file, there's no way for us to understand what configuration you are building, and no way to reproduce your build. Also, could you make sure to restart the build from scratch by doing "make clean; make". Your report very much looks like a change in the toolchain configuration, without doing a full rebuild. See http://buildroot.org/downloads/manual/manual.html#full-rebuild. Created attachment 5654 [details]
attached config file
Hi, Thanks for the early response. i have used "make clean;make" but still i am not able to solve this issue. please let me know if i need to change anything config. please find the attached config file. We need the ".config" file, not Config.in which is a part of buildroot itself. Created attachment 5660 [details]
attached config file
Hi,
PLease find the attached config file. please let me know if you need further info.
Thanks
R
Did you customize your uClibc configuration using "make uclibc-menuconfig" ? Do you still see this problem? If so, could you answer the question raised in comment #7 and provide your uclibc configuration file too? Thanks. I'm able to reproduce the problem, with the config provided by the bug submitter. The corresponding defconfig is: BR2_arm=y BR2_arm1176jzf_s=y BR2_ARM_EABIHF=y BR2_TOOLCHAIN_BUILDROOT_VENDOR="raspberry" BR2_KERNEL_HEADERS_3_16=y BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y BR2_TOOLCHAIN_BUILDROOT_WCHAR=y BR2_BINUTILS_VERSION_2_24=y BR2_GCC_VERSION_4_9_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y # BR2_GCC_ENABLE_TLS is not set BR2_INIT_NONE=y # BR2_PACKAGE_BUSYBOX is not set # BR2_TARGET_ROOTFS_TAR is not set Most likely, the problem is due to "# BR2_GCC_ENABLE_TLS is not set". I confirm, re-enabling TLS support makes the build success. *** Bug 7921 has been marked as a duplicate of this bug. *** I have encountered the same issue with Buildroot-2015-08. After some investigation, I found out that BR2_PTHREADS_NATIVE=y Switches on UCLIBC_HAS_THREADS_NATIVE=y uclibc config, which automatically triggers UCLIBC_HAS_TLS=y So, if gcc is built without tls, this leads to the error from this ticket. After switching threads to something different uclibc builds fine without tls in gcc. I thinks, these two options (BR2_PTHREADS_NATIVE and BR2_GCC_ENABLE_TLS) should be connected, since tls has to either be enabled in both gcc and uclibc, or likewise disabled in both. I have encountered the same issue with Buildroot-2015-08. After some investigation, I found out that BR2_PTHREADS_NATIVE=y Switches on UCLIBC_HAS_THREADS_NATIVE=y uclibc config, which automatically triggers UCLIBC_HAS_TLS=y So, if gcc is built without tls, this leads to the error from this ticket. After switching threads to something different uclibc builds fine without tls in gcc. I think, these two options (BR2_PTHREADS_NATIVE and BR2_GCC_ENABLE_TLS) should be connected, since tls has to either be enabled in both gcc and uclibc, or likewise disabled in both. (In reply to comment #13) > So, if gcc is built without tls, this leads to the error from this ticket. > After switching threads to something different uclibc builds fine without tls > in gcc. I think, these two options (BR2_PTHREADS_NATIVE and BR2_GCC_ENABLE_TLS) > should be connected, since tls has to either be enabled in both gcc and uclibc, > or likewise disabled in both. Thanks for the report. Our plan is to make the TLS option no longer visible, and make TLS mandatory when thread support is enabled. If you want to tackle that, don't hesitate to send a patch! (In reply to comment #14) > Thanks for the report. Our plan is to make the TLS option no longer visible, > and make TLS mandatory when thread support is enabled. If you want to tackle > that, don't hesitate to send a patch! I think forcing TLS is a good idea, and BR2_PTHREADS_NATIVE should be the only threads option (if enabled) for uclibc, as with uclibc-ng. If I had known about TLS when I was building my original toolchains for my Optware-ng project using Buildroot-2015-02, I would have enabled it. For now, until I eventually migrate to uclibc-ng (plan to create new feeds and abandon old ones), I have to make sure that upgraded toolchains are compatible with the old ones, so have to disable TLS. Fixed by https://git.buildroot.org/buildroot/commit/?h=next&id=1bd02bc230e1b3b22ca3eb23fb3dcb91b878283a, which simply removes the option to enable/disable TLS support. Now TLS support is automatically enabled or disable in gcc depending on the selected C library and its configuration. |
/usr/bin/make -j1 HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" silentoldconfig make[1]: Entering directory `/home/anu/elinux/buildroot-2014.08' BR2_DEFCONFIG='' KCONFIG_AUTOCONFIG=/home/anu/elinux/buildroot-2014.08/output/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/anu/elinux/buildroot-2014.08/output/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/anu/elinux/buildroot-2014.08/output/build/buildroot-config/tristate.config BR2_CONFIG=/home/anu/elinux/buildroot-2014.08/.config BR2_EXTERNAL=support/dummy-external /home/anu/elinux/buildroot-2014.08/output/build/buildroot-config/conf --silentoldconfig Config.in make[1]: Leaving directory `/home/anu/elinux/buildroot-2014.08' >>> uclibc 0.9.33.2 Building /usr/bin/make -j9 -C /home/anu/elinux/buildroot-2014.08/output/build/uclibc-0.9.33.2 ARCH="arm" CROSS_COMPILE="/home/anu/elinux/cross_compiler/usr/bin/arm-raspberry-linux-uclibcgnueabihf-" UCLIBC_EXTRA_CFLAGS=" " HOSTCC="/usr/bin/gcc" PREFIX= DEVEL_PREFIX=/ RUNTIME_PREFIX=/ all make[1]: Entering directory `/home/anu/elinux/buildroot-2014.08/output/build/uclibc-0.9.33.2' LD ld-uClibc-0.9.33.2.so ldso/ldso/ld-uClibc_so.a(ldso.oS): In function `_dl_nothread_init_static_tls': ldso.c:(.text+0xf00): undefined reference to `__builtin_thread_pointer' collect2: error: ld returned 1 exit status make[1]: *** [lib/ld-uClibc.so] Error 1 make[1]: Leaving directory `/home/anu/elinux/buildroot-2014.08/output/build/uclibc-0.9.33.2' make: *** [/home/anu/elinux/buildroot-2014.08/output/build/uclibc-0.9.33.2/.stamp_built] Error 2