Thread-local storage

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Am attempting to cross-compile the selinux libraries pretty much just for shits and giggles and have run in to an interesting problem. Well, interesting to me ;)

Quote:
matchpathcon.c:80: error: thread-local storage not supported for this target

The offending code is

static __thread unsigned int myflags;

Is this the responsibility of the compiler or the c library and what will it take to introduce thread-local storage on the avr32?

Cheers,
S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

squidgit wrote:
Is this the responsibility of the compiler or the c library and what will it take to introduce thread-local storage on the avr32?

Both, I think. It's not a trivial task to implement TLS on avr32 -- it requires modification of gcc, as and ld, as well as the C library and possibly the kernel. Although I'm not sure if uClibc can actually make use of it unless you use the experimental "nptl" branch.

The assembler and linker support is probably the most tricky part. After that is done, I think the gcc and libc bits should just slide neatly into place with some tweaking (i.e. setting a few defines to indicate that we support it and how.)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm, might have to abandon that one for now then 8D;; I'll keep an eye out for it in the future.

Cheers how,

S.