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]

[Bug target/14300] New: -pthread doesn't define _REENTRANT in preprocessor on alpha-linux


I noticed that on alpha-linux using -pthread gcc option doesn't cause cpp
to have _REENTRANT defined (like it is on most archs, including
{i386,amd64,ppc,sparc}-linux).
I found similar report for ia64-linux in your bugzilla (PR 10865, unresolved
yet).

On alpha-linux specs file contains the following options for cpp:
| *cpp:
| %(cpp_subtarget)
|
| *cpp_subtarget:
| -D__ELF__

while for example i386 contains:
| *cpp:
| %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}

also on alpha-osf _REENTRANT is defined (from gcc/config/alpha/osf.h):
| #undef CPP_SUBTARGET_SPEC
| #define CPP_SUBTARGET_SPEC \
| "%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}"

I suppose this is a bug (though bug may be not good word - better to say
accidental inconsistency between ports? as -pthread is documented only for ppc
(RS/6000), but exists in most of ports...), not intentional omission?

-- 
           Summary: -pthread doesn't define _REENTRANT in preprocessor on
                    alpha-linux
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: qboosh at pld-linux dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: alpha-linux
  GCC host triplet: alpha-linux
GCC target triplet: alpha-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14300


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