osf.h (CPP_SUBTARGET_SPEC): Handle -threads.
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>
Fri, 4 Jun 1999 13:41:19 +0000 (13:41 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 4 Jun 1999 13:41:19 +0000 (06:41 -0700)
        * alpha/osf.h (CPP_SUBTARGET_SPEC): Handle -threads.
        (LIB_SPEC): Likewise.
        Link with -lprof1_r for -g/-pg.

From-SVN: r27353

gcc/ChangeLog
gcc/config/alpha/osf.h

index f149d33d300122584ce7bcb787824481bedc17b7..aabadb8f882f43339bb0c3b020df353422731b97 100644 (file)
@@ -1,3 +1,9 @@
+Fri Jun  4 13:30:27 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * alpha/osf.h (CPP_SUBTARGET_SPEC): Handle -threads.
+       (LIB_SPEC): Likewise.
+       Link with -lprof1_r for -g/-pg.
+
 1999-06-04  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
 
        * loop.c (check_dbra_loop): Fix change of Jan 19.
index cd0669ae8d6ba53851b6e32e0130d047925ef12b..5054444a759979d48cf5c1345c1da93b14693994 100644 (file)
@@ -30,14 +30,19 @@ Boston, MA 02111-1307, USA.  */
 -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD \
 -D_SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4)"
 
+/* Accept DEC C flags for multithreaded programs.  We use _PTHREAD_USE_D4
+   instead of PTHREAD_USE_D4 since both have the same effect and the former
+   doesn't invade the users' namespace.  */
+
+#undef CPP_SUBTARGET_SPEC
 #define CPP_SUBTARGET_SPEC \
-"%{pthread:-D_REENTRANT}"
+"%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}"
 
 /* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf.  */
 
 #define LIB_SPEC \
-"%{p:-lprof1 -lpdf} %{pg:-lprof1 -lpdf} %{a:-lprof2} \
- %{pthread: -lpthread -lmach -lexc} -lc"
+"%{p|pg:-lprof1%{pthread|threads:_r} -lpdf} %{a:-lprof2} \
+ %{threads: -lpthreads} %{pthread|threads: -lpthread -lmach -lexc} -lc"
 
 /* Pass "-G 8" to ld because Alpha's CC does.  Pass -O3 if we are
    optimizing, -O1 if we are not.  Pass -shared, -non_shared or