This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

__thread


Hi!

I'm trying to compile glibc-2.2.5 for arm-elf with both gcc-3.2 and the latest snapshot (currently gcc-20030310). While it was a successful attempt with gcc-3.2, compiling with the snapshot I got the following error:

In file included from ../include/pthread.h:1,
from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:23,
from ../sysdeps/generic/ldsodefs.h:34,
from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
from ../sysdeps/unix/sysv/linux/init-first.c:32:
../linuxthreads/sysdeps/pthread/pthread.h:163: error: parse error before "__thread"


The line in ../linuxthreads/sysdeps/pthread/pthread.h was:

extern int pthread_create (pthread_t *__restrict __thread,

I made a check: preprocessed init-first.c with both compilers (both preprocessed file contained the line above) and then compiled the results with the compilers exchanged. The result was the same: gcc-3.2 passed (on snapshot-preprocessed file) and the snapshot failed (on gcc-3.2-preprocessed file).

As I read some former mails in the archive, I found that gcc-3.2 should have failed with __thread and the snapshot should have passed.

I also found that there is something done with __thread in the gcc/fixinc directory of the snapshot, but this thing is missing from the gcc-3.2.

My questions are:

- What is the purpose of the fixinc directory?
- Could the things in the fixinc "correct" the glibc headers, and if they could, how?
- Is that a bug in gcc-3.2 that it accepts __thread? (By the way, it accepts anything at that place.)
- How can I get the snapshot to compile glibc?


Thanks:

gertom
--
**************************************************************************
* Gergely Tamás                                    e-mail:gertom at rgai dot hu *
**************************************************************************


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]