This is the mail archive of the gcc-bugs@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]

_REENTRANT not defined when -pthread is used on alpha-linux


I noticed that on alpha-linux _REENTRANT is not automatically defined
when -pthread command line option is used.
Is it a bug, or desired behaviour?

_REENTRANT is defined on most other archs (at least
{i386,amd64,ppc,sparc}-linux) through *cpp in specs file.

On alpha-linux specs contains:

| *cpp:
| %(cpp_subtarget)
| 
| *cpp_subtarget:
| -D__ELF__

while for example on i386-linux it contains:

| *cpp:
| %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}

and alpha-osf seems to have -D_REENTRANT - from gcc/config/alpha/osf.h:

| #undef CPP_SUBTARGET_SPEC
| #define CPP_SUBTARGET_SPEC \
| "%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}"


I noticed this in gcc 3.3.3, but browsing gcc/config/alpha directory
through cvsweb I haven't noticed any changes in this area.


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/
PLD Team        http://www.pld-linux.org/


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