diff options
author | Steve Huston <shuston@riverace.com> | 2002-11-23 23:18:06 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2002-11-23 23:18:06 +0000 |
commit | 5028a0bd523bd02b55746956692444a58bd285cb (patch) | |
tree | 5d97cd2cf32c5d802fa250a21eda2a4f0e7359fb /include | |
parent | 2eaa64b9f7a6f31fb506d3574ec8e35aa1705568 (diff) | |
download | ATCD-5028a0bd523bd02b55746956692444a58bd285cb.tar.gz |
ChangeLogTag:Sat Nov 23 18:12:37 2002 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/makeinclude/platform_aix4_g++.GNU | 95 | ||||
-rw-r--r-- | include/makeinclude/platform_aix_g++.GNU | 86 |
2 files changed, 69 insertions, 112 deletions
diff --git a/include/makeinclude/platform_aix4_g++.GNU b/include/makeinclude/platform_aix4_g++.GNU deleted file mode 100644 index c047d47044c..00000000000 --- a/include/makeinclude/platform_aix4_g++.GNU +++ /dev/null @@ -1,95 +0,0 @@ -# $Id$ -# -# Platform macros for building on AIX 4.x with g++. This has been tested on -# AIX 4.3 with gcc 3.2 -# -# Original contributed by Ian Wright <I.Wright@elsevier.co.uk>. Updated for -# AIX 4 and egcs by Steve Huston <shuston@riverace.com>. - - -ifeq (,$(debug)) - debug = 1 -endif -ifeq (,$(distrib)) - distrib = 0 -endif -ifeq (,$(optimize)) - optimize = 0 -endif -ifeq (,$(threads)) - threads = 1 -endif -ifeq (,$(exceptions)) - exceptions = 0 -endif -ifeq (,$(with_ld)) - with_ld = aix -endif - -# 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 -# aix_build turns on the funky shared library building code in -# rules.lib.GNU -aix_build = 1 - -ifeq (0,$(threads)) - CFLAGS += -DACE_MT_SAFE=0 -endif -ifeq (1,$(threads)) - CFLAGS += -pthread -endif - -# 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) -AIX_VERS := $(AIX_MAJOR_VERS)0$(AIX_MINOR_VERS) - -CC = gcc -CXX = g++ - -# Test for template instantiation. -# -include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU - - -CFLAGS += -W -Wall -pipe -mcpu=common -DACE_AIX_VERS=$(AIX_VERS) -ifeq (32,$(buildbits)) - CFLAGS += -m32 -endif -ifeq (32,$(buildbits)) - CFLAGS += -m64 -endif -CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) -DCFLAGS += -g -DLD = $(CXX) -LD = $(CXX) -LDFLAGS += -Wl,-bI:/lib/pse.exp -# Linking TAO_IDL runs out of TOC space unless -bbigtoc is given to ld. -# Don't do it for everything because it decreases run-time performance. -ifeq ($(notdir $(shell pwd)), TAO_IDL) -LDFLAGS += -Wl,-bbigtoc -endif -OCFLAGS = -O2 -OCCFLAGS = $(OCFLAGS) -ifeq ($(threads),1) -SOFLAGS += -pthread -endif -SOFLAGS += -shared -Wl,-bexpall # -Wl,-bloadmap:lib.map -LIBS += -ltli_r -ldl -ARFLAGS = cruv -RANLIB = ranlib - -# On AIX, shared libraries are not generally left in .so form to link against. -# To do so requires the run-time linker and that is an unnecessary evil. -# So build the .so as usual, but then put in an archive library to link -# against. The archive lib is the one installed for run-time use also, though -# if you want to use ACE's dynamic loading features, you'll also need the -# .so file. -ifeq ($(shared_libs),1) -ACELIB = -lACEshr -SHLIBA = $(SHLIB:lib%.so=lib%shr.a) -endif diff --git a/include/makeinclude/platform_aix_g++.GNU b/include/makeinclude/platform_aix_g++.GNU index 29469a49743..70496454f21 100644 --- a/include/makeinclude/platform_aix_g++.GNU +++ b/include/makeinclude/platform_aix_g++.GNU @@ -1,38 +1,90 @@ # $Id$ # # Platform macros for building on AIX with g++. This has been tested on -# AIX 4.1.4 and gcc 2.7.2.3. -# -# A note - later versions of gcc(>2.7.2.3, I don't know which) have a -mthreads -# flag which does the same job more elegantly. -# I haven't managed to get the shared library to work. -# I know having tli_r and tli is a bad idea, but it won't link otherwise. +# AIX 4.3 with gcc 3. Earlier versions of gcc may compile, but are known to +# have serious problems on AIX. # # Contributed by Ian Wright <I.Wright@elsevier.co.uk> +# Updated for AIX 4.3 and gcc 3 by Steve Huston <shuston@riverace.com> + +ifeq (,$(debug)) + debug = 1 +endif +ifeq (,$(distrib)) + distrib = 0 +endif +ifeq (,$(exceptions)) + exceptions = 1 +endif +ifeq (,$(optimize)) + optimize = 1 +endif +ifeq (,$(rtti)) + rtti = 0 +endif +ifeq (,$(threads)) + threads = 1 +endif +ifeq (,$(buildbits)) + buildbits = native +endif +ifeq (,$(with_ld)) + with_ld = aix +endif + +# 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 +# aix_build turns on the funky shared library building code in +# rules.lib.GNU +aix_build = 1 -debug = 1 -static_libs_only = 1 +ifeq (0,$(threads)) + CFLAGS += -DACE_MT_SAFE=0 +endif +ifeq (1,$(threads)) + CFLAGS += -pthread +endif -CC = gcc -CXX = gcc +# 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) +AIX_VERS := $(AIX_MAJOR_VERS)0$(AIX_MINOR_VERS) + +CC = gcc +CXX = g++ # Test for template instantiation. # include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU -CFLAGS += -W -Wall -nostdlib -mcpu=common +CFLAGS += -W -Wall -mcpu=common -DACE_AIX_VERS=$(AIX_VERS) +ifeq ($(buildbits),32) + CFLAGS += -m32 +endif +ifeq ($(buildbits),64) + CFLAGS += -m64 +endif CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) - -#only needed for one of the tests and causes compiler errors in building libACE -#CCFLAGS += -fhandle-exceptions DCFLAGS += -g DLD = $(CXX) LD = $(CXX) +# Linking TAO_IDL runs out of TOC space unless -bbigtoc is given to ld. +# Don't do it for everything because it decreases run-time performance. +ifeq ($(notdir $(shell pwd)), TAO_IDL) +LDFLAGS += -Wl,-bbigtoc +endif + OCFLAGS = -O2 OCCFLAGS = $(OCFLAGS) -LIBS += /lib/crt0_r.o -L/usr/lib/threads -lsvld -lC_r -lpthreads --lc_r -ltli_r -lg++ -lstdc++ -lm -lg -ltli -lgcc -PIC = -fPIC +ifeq ($(threads),1) +SOFLAGS += -pthread +endif +SOFLAGS += -shared -Wl,-bexpall # -Wl,-bloadmap:lib.map +LIBS += -ltli_r -ldl ARFLAGS = cruv RANLIB = ranlib SONAME = |