LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Thread local support for ARM (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/thread-local-support-for-arm-605573/)

hannu_h 12-09-2007 06:55 AM

Thread local support for ARM
 
I'm developing software for AT91RM9200 CPU using a crosstool (0.43) generated build environment.

Crosstool itself appears to work fine, but I have not been able to get support for thread local variables working.

Compilation of "__thread int variable;" goes wrong as described below

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Building file: ../src/ARM_Test2.c
Invoking: GCC C Compiler
/opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-9tdmi-linux-gnu/bin/arm-9tdmi-linux-gnu-gcc -O0 -g3 -Wall -c -fmessage-length=0 -pthread -MMD -MP -MF"src/ARM_Test2.d" -MT"src/ARM_Test2.d" -o"src/ARM_Test2.o" "../src/ARM_Test2.c"
../src/ARM_Test2.c:16: error: thread-local storage not supported for this target
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Content of "arm-9tdmi-linux-gnu.crosstoolconfig.txt", which to my understanding should contain necessary switches for TLS.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
AR=
BINUTILS_DIR=binutils-2.16.1
BINUTILS_EXTRA_CONFIG=
BUILD=i686-pc-linux-gnu
BUILD_DIR=/home/hannu/XBuild/crosstool-0.43/build/arm-9tdmi-linux-gnu/gcc-4.1.0-glibc-2.3.2
CC=
DEJAGNU=
EXTRA_TARGET_CFLAGS=
GCC_BUILD=
GCC_CORE_DIR=gcc-3.3.6
GCC_DIR=gcc-4.1.0
GCC_EXTRA_CONFIG=--with-cpu=arm9tdmi --enable-cxx-flags=-mcpu=arm9tdmi
GCC_HOST=
GCC_LANGUAGES=c,c++
GDB_DIR=gdb-6.5
GLIBC_ADDON_OPTIONS==linuxthreads,
GLIBC_DIR=glibc-2.3.2
GLIBC_EXTRA_CC_ARGS=
GLIBC_EXTRA_CONFIG= --with-tls --with-__thread --enable-kernel=2.4.18
GLIBC_EXTRA_ENV=
JUST_DOWNLOAD=
KERNELCONFIG=/home/hannu/XBuild/crosstool-0.43/arm.config
LINUX_DIR=linux-2.6.15.4
LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.12.0
NO_DOWNLOAD=
PREFIX=/opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-9tdmi-linux-gnu
PTXDIST_DIR=
SHARED_MODE=--enable-shared
SRC_DIR=/home/hannu/XBuild/crosstool-0.43/build/arm-9tdmi-linux-gnu/gcc-4.1.0-glibc-2.3.2
TARBALLS_DIR=/home/hannu/downloads
TARGET=arm-9tdmi-linux-gnu
TARGET_CFLAGS=-O
TOP_DIR=/home/hannu/XBuild/crosstool-0.43
USE_SYSROOT=
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Suggestions where to look next would be appreciated

--Hannu

Mara 12-09-2007 03:00 PM

From what I know you need binutils-2.16.90 or newer.


All times are GMT -5. The time now is 10:55 AM.