This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
_REENTRANT not defined when -pthread is used on alpha-linux
- From: Jakub Bogusz <qboosh at pld-linux dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 22 Feb 2004 14:18:45 +0100
- Subject: _REENTRANT not defined when -pthread is used on alpha-linux
- Organization: Black Hosts
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/