summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2005-03-24 19:12:55 +0000
committerSteve Huston <shuston@riverace.com>2005-03-24 19:12:55 +0000
commit10452ac1206fff95ea22675d2fb15eb81eb4ec8b (patch)
treeefc55f0fed02d1f5509bd38ec1f7a49c744dbaf2
parent655062e78019ef4f427046d0181d476b0cc3539f (diff)
downloadATCD-10452ac1206fff95ea22675d2fb15eb81eb4ec8b.tar.gz
ChangeLogTag:Thu Mar 24 14:12:19 2005 Steve Huston <shuston@riverace.com>
-rw-r--r--ChangeLog9
-rw-r--r--include/makeinclude/platform_hpux_aCC.GNU53
2 files changed, 40 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ee2b96fa0a..fcfe3284218 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Thu Mar 24 14:12:19 2005 Steve Huston <shuston@riverace.com>
+
+ * include/makeinclude/platform_hpux_aCC.GNU: Rather than hand-set all
+ needed macros and library references for multithreading, use the
+ compiler's -mt option if not on a .2x compiler version. -mt was
+ added at 03.30, so 03.2x doesn't have it - maintain the hand-set
+ values for that. This leaves out .1x versions which probably
+ aren't used any longer anyway.
+
Thu Mar 24 13:17:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
* examples/APG/Containers/Hash_Map_Hash.h:
diff --git a/include/makeinclude/platform_hpux_aCC.GNU b/include/makeinclude/platform_hpux_aCC.GNU
index 6babb2db9f7..28aaa01ec6a 100644
--- a/include/makeinclude/platform_hpux_aCC.GNU
+++ b/include/makeinclude/platform_hpux_aCC.GNU
@@ -81,18 +81,25 @@ endif
# Set the appropriate preprocessor defs for threading based on OS version
# and specified compiler options.
ifeq ($(threads),1)
- THR_DEFS = -DACE_HAS_THREADS -D_REENTRANT
+ THR_DEFS = -DACE_HAS_THREADS
- # Different for v2 vs. v1 C++ library selection.
- ifeq (1,$(stdcpplib))
- THR_DEFS += -D_RWSTD_MULTI_THREAD
+ # x.30 was the first version offering -mt. So, if it's a .2x version,
+ # set the defs by hand; anything else, use -mt. This leaves out .1x
+ # versions, which should be no problem at this point.
+ ifeq (,$(filter 2%,$(CXXMINORVERS)))
+ THR_DEFS += -mt
else
- THR_DEFS += -DRWSTD_MULTI_THREAD -D_THREAD_SAFE
- endif
+ # Different for v2 vs. v1 C++ library selection.
+ ifeq (1,$(stdcpplib))
+ THR_DEFS += -D_RWSTD_MULTI_THREAD
+ else
+ THR_DEFS += -DRWSTD_MULTI_THREAD -D_THREAD_SAFE
+ endif
- # For HP-UX 11.x, choose kernel threads over CMA (user) threads.
- ifeq ($(word 2,$(HPVERS_WORDS)), 11)
- THR_DEFS += -D_POSIX_C_SOURCE=199506L
+ # For HP-UX 11.x, choose kernel threads over CMA (user) threads.
+ ifeq ($(word 2,$(HPVERS_WORDS)), 11)
+ THR_DEFS += -D_POSIX_C_SOURCE=199506L
+ endif
endif
else
THR_DEFS = -DACE_HAS_THREADS=0
@@ -208,21 +215,23 @@ endif
#
ifeq ($(word 2,$(HPVERS_WORDS)), 11)
-#11.x:
-ifeq ($(threads),1)
-## -L./ must directly preceed the system libraries for 64-bit builds
-## with aCC 3.27. Without this change, libpthread.sl can not be found.
-LIBS += -L./ -lxti -lpthread -lrt -ldld
-else
-LIBS += -lxti -lrt -ldld
-endif
+ #11.x:
+ ifeq ($(threads),1)
+ # If -mt is in CPPLAGS, we don't need to add anything to LIBS; -mt does it.
+ ifeq ($(findstring -mt,$(CPPFLAGS)),)
+ ## -L./ must directly preceed the system libraries for 64-bit builds
+ ## with aCC 3.27. Without this change, libpthread.sl can not be found.
+ LIBS += -L./ -lpthread
+ endif
+ endif
+ LIBS += -lxti -lrt -ldld
else
-# 10.x:
-LIBS += -lxti -ldld
-ifeq ($(threads),1)
-LIBS += -lcma
-endif
+ # 10.x:
+ LIBS += -lxti -ldld
+ ifeq ($(threads),1)
+ LIBS += -lcma
+ endif
endif