summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/config-aix-4.x.h10
-rw-r--r--include/makeinclude/platform_aix_vacpp.GNU87
-rw-r--r--include/makeinclude/rules.lib.GNU13
3 files changed, 89 insertions, 21 deletions
diff --git a/ace/config-aix-4.x.h b/ace/config-aix-4.x.h
index 42dd77418d8..34dd276f57b 100644
--- a/ace/config-aix-4.x.h
+++ b/ace/config-aix-4.x.h
@@ -9,14 +9,10 @@
#define ACE_CONFIG_H
#include "ace/pre.h"
-#if defined (__xlC__) || (__IBMCPP__)
+#if defined (__xlC__) || defined (__IBMCPP__)
// AIX xlC, IBM C/C++, and Visual Age C++ compilers
//********************************************************************
//
- // Compiler-related definitions. These are set for C Set ++ V3
-# if !defined (ACE_HAS_EXCEPTIONS)
-# define ACE_HAS_EXCEPTIONS
-# endif
// Compiler supports the ssize_t typedef.
# define ACE_HAS_SSIZE_T
@@ -32,7 +28,9 @@
// C Set++ 3.1 and IBM C/C++ 3.6
# if defined (__xlC__)
-# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
+# if (__xlC__ < 0x0500)
+# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
+# endif /* __xlC__ < 0x0500 */
# define ACE_TEMPLATES_REQUIRE_PRAGMA
// If compiling without thread support, turn off ACE's thread capability.
# if !defined (_THREAD_SAFE)
diff --git a/include/makeinclude/platform_aix_vacpp.GNU b/include/makeinclude/platform_aix_vacpp.GNU
index ddab223ab96..626940dcc49 100644
--- a/include/makeinclude/platform_aix_vacpp.GNU
+++ b/include/makeinclude/platform_aix_vacpp.GNU
@@ -1,13 +1,7 @@
# $Id$
-# AIX 4.2.x and higher using the Visual Age C++ environment.
+# AIX 4.3 and higher using the Visual Age C++ 5 batch compiler (xlC_r)
# *not* using Orbix
-#
-# On 4.2, the AIX fileset bos.rte.bind_cmds must be at version 4.2.0.2 or
-# higher in order to build libACEshr.a, and at 4.2.0.4 or higher for dl*()
-# routines to work properly. Best to apply the update available at:
-# ftp://service.boulder.ibm.com/aix/fixes/v4/os/bos.rte.bind_cmds.4.2.0.4.bff
-# or a successor.
ifeq (,$(debug))
debug = 1
@@ -15,21 +9,86 @@ endif
ifeq (,$(distrib))
distrib = 0
endif
+ifeq (,$(exceptions))
+ exceptions = 1
+endif
ifeq (,$(optimize))
optimize = 0
endif
+ifeq (,$(threads))
+ threads = 1
+endif
+
+# Note - Visual Age C++ pre-V5 didn't have a way to turn exception handling
+# off, and V5 building ACE without exception handling causes segv on startup
+# of every test. Until this is straightened out, force exceptions=1
+exceptions=1
# In case anything here or in the config depends on OS version number,
# grab it here and pass it all to the compiler as well.
AIX_MAJOR_VERS := $(shell uname -v)
AIX_MINOR_VERS := $(shell uname -r)
-# Visual Age C++ does everything - maintain dependency information, build
-# commands, and results. The Makefile scheme here is primarily for cases
-# where multiple targets are to be built (such as in the 'tests' directory)
-# and multiple configurations are used for it. Set a variable to say that
-# VACPP is in charge, and the build scheme then runs vacbld rather than
-# go through the whole dependency check.
+ifeq ($(threads),1)
+# Note - the _r form of the compiler command turns on -qthreads and the
+# thread-required preprocessor defines, as well as -lpthreads for linking.
+CC = xlc_r
+CXX = xlC_r
+else
+CC = xlc
+CXX = xlC
+endif
+DLD = $(CXX) -qmkshrobj
+
+# -qextchk is handy, but produces false type mismatches when linking
+# netsvcs with 3.1.4, so it's disabled. IBM reports this fixed in 3.6.4.
+CCFLAGS += $(CFLAGS) -qonce -qtempinc
+ifeq ($(exceptions),0)
+CCFLAGS += -qnoeh
+endif
+
+CPPFLAGS += -DACE_AIX_MAJOR_VERS=$(AIX_MAJOR_VERS) -DACE_AIX_MINOR_VERS=$(AIX_MINOR_VERS)
+ifeq (1,$(rtti))
+ CCFLAGS += -qrtti=dynamiccast
+else # ! rtti
+ CCFLAGS += -DACE_LACKS_RTTI
+endif # ! rtti
+
+# Define options used for debug=1 builds.
+# -qextchk still produces type mismatch errors... should look into this.
+# -qcheck messes up ACE_Allocator::instance? - no, seems ok
+# How about -qinitauto?
+DCFLAGS += -g
+
+LD = $(CXX)
+
+# Yes, believe it or not...
+# The way to make a shared lib on AIX is to make a shared object file and
+# then put that in an archive.
+# Non-shared archives are named lib<x>ns.a - ns = non-shared.
+SOEXT = a
+
+SOFLAGS = $(CCFLAGS) $(CPPFLAGS) $(INCLDIRS)
+
+aix_build = 1
+ifeq ($(shared_libs),1)
+ACELIB = -lACE
+else
+ACELIB = -lACEns
+endif
-using_aix_vacpp = 1
+LIBS += -ltli_r -ldl
+ARFLAGS = ruv
+AR = ar
+LDFLAGS += -bloadmap:vacpp.map
+# Default OCCFLAGS builds common code for all RS/6000 architectures but
+# this can be set to optimize for your particular computer. The commented
+# out example optimizes for RS/6000 43P.
+# OCCFLAGS is not used by default. To used it, set optimize=1
+# either in this file or on the command line.
+#OCCFLAGS += -qarch=ppc -qtune=604
+OCCFLAGS += -qlibansi -O2 -qarch=com
+RANLIB = ranlib
+#TEMPINCDIR = tempinc
+SOBUILD =
diff --git a/include/makeinclude/rules.lib.GNU b/include/makeinclude/rules.lib.GNU
index 5e9b2a531d1..ddc6eabf0d9 100644
--- a/include/makeinclude/rules.lib.GNU
+++ b/include/makeinclude/rules.lib.GNU
@@ -119,8 +119,19 @@ endif # RANLIB
ifdef SHLIBBUILD
$(VSHLIB): $(VSHOBJS)
else
+ifeq (1,$(aix_build))
+$(VSHLIB): shr.o
+ $(AR) $(ARFLAGS) $@ $?
+ -chmod a+rx $@
+ifneq (,$(RANLIB))
+ -$(RANLIB) $@
+endif # RANLIB
+
+shr.o: $(VSHOBJS1)
+else
$(VSHLIB): $(VSHOBJS1)
-endif
+endif # aix_build
+endif # SHLIBBUILD
ifdef PRELIB
$(PRELIB)
endif