summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-04-07 09:38:05 +0000
committerkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-04-07 09:38:05 +0000
commit329d29500dbb494caa0727586aa80bc708889036 (patch)
tree26afe502734f042f55745036ed84e7a5612f22fb
parentacc8b760002727122b03af89035cdc42fdff32c2 (diff)
downloadATCD-329d29500dbb494caa0727586aa80bc708889036.tar.gz
ChangeLogTag: Sun Apr 7 04:22:19 2002 Krishnakumar B <kitty@cs.wustl.edu>
-rw-r--r--ChangeLog49
-rw-r--r--ChangeLogs/ChangeLog-02a49
-rw-r--r--ChangeLogs/ChangeLog-03a49
-rw-r--r--include/makeinclude/platform_aix4_g++.GNU10
-rw-r--r--include/makeinclude/platform_aix_g++.GNU10
-rw-r--r--include/makeinclude/platform_chorus4.x_g++.GNU11
-rw-r--r--include/makeinclude/platform_freebsd.GNU39
-rw-r--r--include/makeinclude/platform_g++_common.GNU34
-rw-r--r--include/makeinclude/platform_gnuwin32_common.GNU10
-rw-r--r--include/makeinclude/platform_hpux_gcc.GNU6
-rw-r--r--include/makeinclude/platform_irix5.3_g++.GNU10
-rw-r--r--include/makeinclude/platform_irix6.x_g++.GNU7
-rw-r--r--include/makeinclude/platform_linux.GNU32
-rw-r--r--include/makeinclude/platform_osf1_4.x_g++.GNU7
-rw-r--r--include/makeinclude/platform_psosim_g++.GNU9
-rw-r--r--include/makeinclude/platform_rtems.x_g++.GNU10
-rw-r--r--include/makeinclude/platform_sco5.0.0-mit-pthread.GNU9
-rw-r--r--include/makeinclude/platform_sco5.0.0-nothread.GNU13
-rw-r--r--include/makeinclude/platform_sunos4_g++.GNU11
-rw-r--r--include/makeinclude/platform_sunos5_g++.GNU6
-rw-r--r--include/makeinclude/platform_unixware_g++.GNU9
-rw-r--r--include/makeinclude/platform_vxworks5.x_g++.GNU45
-rw-r--r--include/makeinclude/wrapper_macros.GNU6
23 files changed, 322 insertions, 119 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a93d43cbba..79d7109effd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,52 @@
+Sun Apr 7 04:22:19 2002 Krishnakumar B <kitty@cs.wustl.edu>
+
+ * include/makeinclude/wrapper_macros.GNU(templates):
+
+ Added option templates which can be used to specify the
+ instantiation policy desired. Allowable values are explicit,
+ automatic and used. Added flag TEMPLATE_FLAGS which should be
+ set to the proper value in each of the platform config files.
+
+ * include/makeinclude/platform_g++_common.GNU:
+
+ New file which holds the parsing and setting logic for GNU C++.
+
+ * include/makeinclude/platform_aix4_g++.GNU(templates):
+ * include/makeinclude/platform_aix_g++.GNU:
+ * include/makeinclude/platform_chorus4.x_g++.GNU:
+ * include/makeinclude/platform_freebsd.GNU:
+ * include/makeinclude/platform_gnuwin32_common.GNU:
+ * include/makeinclude/platform_hpux_gcc.GNU:
+ * include/makeinclude/platform_irix5.3_g++.GNU:
+ * include/makeinclude/platform_irix6.x_g++.GNU:
+ * include/makeinclude/platform_linux.GNU:
+ * include/makeinclude/platform_osf1_4.x_g++.GNU:
+ * include/makeinclude/platform_psosim_g++.GNU:
+ * include/makeinclude/platform_rtems.x_g++.GNU:
+ * include/makeinclude/platform_sco5.0.0-mit-pthread.GNU:
+ * include/makeinclude/platform_sco5.0.0-nothread.GNU:
+ * include/makeinclude/platform_sunos4_g++.GNU:
+ * include/makeinclude/platform_sunos5_g++.GNU:
+ * include/makeinclude/platform_unixware_g++.GNU:
+
+ For all of the platforms above, when using g++ versions 2.95.x,
+ 2.96, 3.0.x or 3.x or later, the instantiation policy is set to
+ automatic.
+
+ * include/makeinclude/platform_vxworks5.x_g++.GNU:
+
+ Only exception to the above. The kind of parsing that is done in
+ this file scares me. So I explicitly set it to "explicit".
+
+ Thanks to Alex Libman <AlexL@rumblegroup.com> for motivating
+ this.
+
+ If people with any of the above platforms can test if this works
+ for them, it would be great. If suddenly your files don't link,
+ just set templates="explicit" in platform_macros.GNU and all
+ will be fine. This one was easy :-) Next round of changes is for
+ the above platforms with different compilers.
+
Sun Apr 7 04:02:23 2002 Krishnakumar B <kitty@cs.wustl.edu>
* ace/config-g++-common.h (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES):
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 2a93d43cbba..79d7109effd 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,52 @@
+Sun Apr 7 04:22:19 2002 Krishnakumar B <kitty@cs.wustl.edu>
+
+ * include/makeinclude/wrapper_macros.GNU(templates):
+
+ Added option templates which can be used to specify the
+ instantiation policy desired. Allowable values are explicit,
+ automatic and used. Added flag TEMPLATE_FLAGS which should be
+ set to the proper value in each of the platform config files.
+
+ * include/makeinclude/platform_g++_common.GNU:
+
+ New file which holds the parsing and setting logic for GNU C++.
+
+ * include/makeinclude/platform_aix4_g++.GNU(templates):
+ * include/makeinclude/platform_aix_g++.GNU:
+ * include/makeinclude/platform_chorus4.x_g++.GNU:
+ * include/makeinclude/platform_freebsd.GNU:
+ * include/makeinclude/platform_gnuwin32_common.GNU:
+ * include/makeinclude/platform_hpux_gcc.GNU:
+ * include/makeinclude/platform_irix5.3_g++.GNU:
+ * include/makeinclude/platform_irix6.x_g++.GNU:
+ * include/makeinclude/platform_linux.GNU:
+ * include/makeinclude/platform_osf1_4.x_g++.GNU:
+ * include/makeinclude/platform_psosim_g++.GNU:
+ * include/makeinclude/platform_rtems.x_g++.GNU:
+ * include/makeinclude/platform_sco5.0.0-mit-pthread.GNU:
+ * include/makeinclude/platform_sco5.0.0-nothread.GNU:
+ * include/makeinclude/platform_sunos4_g++.GNU:
+ * include/makeinclude/platform_sunos5_g++.GNU:
+ * include/makeinclude/platform_unixware_g++.GNU:
+
+ For all of the platforms above, when using g++ versions 2.95.x,
+ 2.96, 3.0.x or 3.x or later, the instantiation policy is set to
+ automatic.
+
+ * include/makeinclude/platform_vxworks5.x_g++.GNU:
+
+ Only exception to the above. The kind of parsing that is done in
+ this file scares me. So I explicitly set it to "explicit".
+
+ Thanks to Alex Libman <AlexL@rumblegroup.com> for motivating
+ this.
+
+ If people with any of the above platforms can test if this works
+ for them, it would be great. If suddenly your files don't link,
+ just set templates="explicit" in platform_macros.GNU and all
+ will be fine. This one was easy :-) Next round of changes is for
+ the above platforms with different compilers.
+
Sun Apr 7 04:02:23 2002 Krishnakumar B <kitty@cs.wustl.edu>
* ace/config-g++-common.h (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES):
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 2a93d43cbba..79d7109effd 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,52 @@
+Sun Apr 7 04:22:19 2002 Krishnakumar B <kitty@cs.wustl.edu>
+
+ * include/makeinclude/wrapper_macros.GNU(templates):
+
+ Added option templates which can be used to specify the
+ instantiation policy desired. Allowable values are explicit,
+ automatic and used. Added flag TEMPLATE_FLAGS which should be
+ set to the proper value in each of the platform config files.
+
+ * include/makeinclude/platform_g++_common.GNU:
+
+ New file which holds the parsing and setting logic for GNU C++.
+
+ * include/makeinclude/platform_aix4_g++.GNU(templates):
+ * include/makeinclude/platform_aix_g++.GNU:
+ * include/makeinclude/platform_chorus4.x_g++.GNU:
+ * include/makeinclude/platform_freebsd.GNU:
+ * include/makeinclude/platform_gnuwin32_common.GNU:
+ * include/makeinclude/platform_hpux_gcc.GNU:
+ * include/makeinclude/platform_irix5.3_g++.GNU:
+ * include/makeinclude/platform_irix6.x_g++.GNU:
+ * include/makeinclude/platform_linux.GNU:
+ * include/makeinclude/platform_osf1_4.x_g++.GNU:
+ * include/makeinclude/platform_psosim_g++.GNU:
+ * include/makeinclude/platform_rtems.x_g++.GNU:
+ * include/makeinclude/platform_sco5.0.0-mit-pthread.GNU:
+ * include/makeinclude/platform_sco5.0.0-nothread.GNU:
+ * include/makeinclude/platform_sunos4_g++.GNU:
+ * include/makeinclude/platform_sunos5_g++.GNU:
+ * include/makeinclude/platform_unixware_g++.GNU:
+
+ For all of the platforms above, when using g++ versions 2.95.x,
+ 2.96, 3.0.x or 3.x or later, the instantiation policy is set to
+ automatic.
+
+ * include/makeinclude/platform_vxworks5.x_g++.GNU:
+
+ Only exception to the above. The kind of parsing that is done in
+ this file scares me. So I explicitly set it to "explicit".
+
+ Thanks to Alex Libman <AlexL@rumblegroup.com> for motivating
+ this.
+
+ If people with any of the above platforms can test if this works
+ for them, it would be great. If suddenly your files don't link,
+ just set templates="explicit" in platform_macros.GNU and all
+ will be fine. This one was easy :-) Next round of changes is for
+ the above platforms with different compilers.
+
Sun Apr 7 04:02:23 2002 Krishnakumar B <kitty@cs.wustl.edu>
* ace/config-g++-common.h (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES):
diff --git a/include/makeinclude/platform_aix4_g++.GNU b/include/makeinclude/platform_aix4_g++.GNU
index 3c2ababa8a1..0654bf3af0a 100644
--- a/include/makeinclude/platform_aix4_g++.GNU
+++ b/include/makeinclude/platform_aix4_g++.GNU
@@ -29,7 +29,7 @@ endif
ifeq (1,$(threads))
CFLAGS += -mthreads
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)
@@ -38,8 +38,14 @@ 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)
-CCFLAGS += $(CFLAGS) -fno-implicit-templates
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
DCFLAGS += -g
DLD = $(CXX)
LD = $(CXX)
diff --git a/include/makeinclude/platform_aix_g++.GNU b/include/makeinclude/platform_aix_g++.GNU
index e3762f17957..d8bf6f8aade 100644
--- a/include/makeinclude/platform_aix_g++.GNU
+++ b/include/makeinclude/platform_aix_g++.GNU
@@ -12,11 +12,17 @@
debug = 1
static_libs_only = 1
-
+
CC = gcc
CXX = gcc
+
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
CFLAGS += -W -Wall -nostdlib -mcpu=common
-CCFLAGS += $(CFLAGS) -fno-implicit-templates
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
+
#only needed for one of the tests and causes compiler errors in building libACE
#CCFLAGS += -fhandle-exceptions
DCFLAGS += -g
diff --git a/include/makeinclude/platform_chorus4.x_g++.GNU b/include/makeinclude/platform_chorus4.x_g++.GNU
index 42c79bd92b2..570cd22bd33 100644
--- a/include/makeinclude/platform_chorus4.x_g++.GNU
+++ b/include/makeinclude/platform_chorus4.x_g++.GNU
@@ -98,11 +98,15 @@ AR = $(TOOLDIR)/ar
RANLIB = $(TOOLDIR)/ranlib
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
#
# Flag Settings
#
CFLAGS += -w
-CCFLAGS += $(CFLAGS) -fno-implicit-templates \
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) \
-fno-strict-prototypes \
-Usun \
-fno-builtin \
@@ -135,7 +139,7 @@ CCFLAGS += -D__CHORUS__=400 \
ifeq ($(exceptions),1)
else # ! exceptions
CCFLAGS += -fno-exceptions
-endif # ! exceptions
+endif # ! exceptions
OCFLAGS += -O
PIC = -fPIC
@@ -154,7 +158,7 @@ CHORUSLINK = true
PRELIB = @true
#
-# Special link process to get the right libraries and
+# Special link process to get the right libraries and
# build up the static constructors and destructors.
#
POSTLINK= -r $(OS_DIR)/lib/CC/libC.a $(OS_DIR)/lib/libbsd/libbsd.a \
@@ -171,4 +175,3 @@ POSTLINK= -r $(OS_DIR)/lib/CC/libC.a $(OS_DIR)/lib/libbsd/libbsd.a \
$(NUCLEUS_DIR)/lib/crt/crtn.o; \
$(RM) $@.xp.o; \
$(RM) $@.ct.o
-
diff --git a/include/makeinclude/platform_freebsd.GNU b/include/makeinclude/platform_freebsd.GNU
index 213680a592d..9128d93029a 100644
--- a/include/makeinclude/platform_freebsd.GNU
+++ b/include/makeinclude/platform_freebsd.GNU
@@ -10,11 +10,11 @@ endif
ifndef exceptions
exceptions = 1
endif
-
+
ifeq (,$(debug))
debug = 1
endif
-
+
ifeq (,$(optimize))
optimize = 1
endif
@@ -22,40 +22,13 @@ endif
CC = gcc
CXX = g++
-CXX_VERSION := $(shell $(CXX) -dumpversion)
-
-# If no option has been specified, try to enable implicit_templates based
-# on the version of the compiler.
-#
-ifeq ($(implicit_templates),)
- ifeq (2.95,$(findstring 2.95,$(CXX_VERSION)))
- implicit_templates = 1
- else
- ifeq (3.,$(findstring 3.,$(CXX_VERSION)))
- implicit_templates = 1
- endif
- ifeq (2.96,$(findstring 2.96,$(CXX_VERSION)))
- implicit_templates = 1
- endif
- endif
-endif
-
-# User didn't specify and we couldn't guess if this version of the compiler
-# works fine with implicit template instantiation. Turn if off. This could
-# as well go into the previous check but GNU Make conditionals are lame.
+# Test for template instantiation.
#
-ifeq ($(implicit_templates),)
- implicit_templates = 0
-endif
-
-ifeq ($(implicit_templates),0)
- ifeq ($(IMPLICIT_TEMPLATES_FLAG),) # Turn on flags if none is speficied.
- IMPLICIT_TEMPLATES_FLAG=-fno-implicit-templates
- endif
-endif
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
CFLAGS += -W -Wall -Wpointer-arith -pipe
-CCFLAGS += $(CFLAGS) $(IMPLICIT_TEMPLATES_FLAG)
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
DCFLAGS += -g
ifneq ($(VERSION),3)
LDFLAGS += -Wl,-rpath $(ACE_ROOT)/ace
diff --git a/include/makeinclude/platform_g++_common.GNU b/include/makeinclude/platform_g++_common.GNU
new file mode 100644
index 00000000000..7c1d98b3743
--- /dev/null
+++ b/include/makeinclude/platform_g++_common.GNU
@@ -0,0 +1,34 @@
+# $Id$
+#
+# Common file help turn on/off explicit template instantiation
+
+CXX_VERSION := $(shell $(CXX) -dumpversion)
+
+# If no option has been specified, try to enable implicit_templates based
+# on the version of the compiler.
+#
+ifeq ($(templates),)
+ ifeq (2.95,$(findstring 2.95,$(CXX_VERSION)))
+ templates = "automatic"
+ else
+ ifeq (3.,$(findstring 3.,$(CXX_VERSION)))
+ templates = "automatic"
+ else
+ ifeq (2.96,$(findstring 2.96,$(CXX_VERSION)))
+ templates = "automatic"
+ else
+ templates = "explicit"
+ endif
+ endif
+ endif
+endif
+
+# User didn't specify and we couldn't guess if this version of the compiler
+# works fine with implicit template instantiation. Turn if off.
+#
+ifeq ("$(templates)","explicit")
+ ifeq ($(TEMPLATES_FLAG),) # Turn on flags if none is speficied.
+ TEMPLATES_FLAG=-fno-implicit-templates
+ endif
+ CPPFLAGS += -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
+endif
diff --git a/include/makeinclude/platform_gnuwin32_common.GNU b/include/makeinclude/platform_gnuwin32_common.GNU
index aee06d0ed29..65d808dda0b 100644
--- a/include/makeinclude/platform_gnuwin32_common.GNU
+++ b/include/makeinclude/platform_gnuwin32_common.GNU
@@ -65,20 +65,20 @@ CFLAGS += $(MODEL_FLAGS)
# Never use -pipe with 95/98. On NT/2000, not sure if it helps.
CFLAGS += -W -Wall -Wpointer-arith
-ifeq ($(IMPLICIT_TEMPLATES_FLAG),)
- IMPLICIT_TEMPLATES_FLAG=-fno-implicit-templates
-endif
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
EXEEXT = .exe
-CCFLAGS += $(CFLAGS) $(IMPLICIT_TEMPLATES_FLAG)
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
DCFLAGS += -g
DLD = $(CXX)
LD = $(CXX)
ifeq ($(mingw32),1)
ifeq ($(winsock2),1)
-LIBS += -lws2_32 -lmswsock
+LIBS += -lws2_32 -lmswsock
endif
LIBS += -lwsock32
endif
diff --git a/include/makeinclude/platform_hpux_gcc.GNU b/include/makeinclude/platform_hpux_gcc.GNU
index 4ef25dac395..921d0e9d29a 100644
--- a/include/makeinclude/platform_hpux_gcc.GNU
+++ b/include/makeinclude/platform_hpux_gcc.GNU
@@ -24,7 +24,11 @@ THR_DEFS = -DACE_HAS_THREADS -D_REENTRANT
endif
endif
-CCFLAGS += $(CFLAGS) -fno-implicit-templates -DHPUX_VERS=$(HPUX_VERS) $(THR_DEFS)
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) -DHPUX_VERS=$(HPUX_VERS) $(THR_DEFS)
# On HP-UX 11, there's a conflict with pthread_atfork in sys/unistd.h and
# sys/pthread.h - both define the function, but slightly differently.
# -fstrict-prototype resolves the issue.
diff --git a/include/makeinclude/platform_irix5.3_g++.GNU b/include/makeinclude/platform_irix5.3_g++.GNU
index 2353ab4170d..5db2d6aa826 100644
--- a/include/makeinclude/platform_irix5.3_g++.GNU
+++ b/include/makeinclude/platform_irix5.3_g++.GNU
@@ -7,10 +7,15 @@ optimize = 1
CC = gcc
CXX = g++
-CCFLAGS += $(CFLAGS) -fno-implicit-templates
+
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
DCFLAGS += -g
DLD = $(CXX)
-LD = $(CXX)
+LD = $(CXX)
LDFLAGS += -L$(ACE_ROOT)/ace
OCFLAGS += -O2
PIC = -fpic
@@ -18,4 +23,3 @@ RANLIB = echo
SOFLAGS = -shared $(CPPFLAGS)
SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.o $<; \
$(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o
-
diff --git a/include/makeinclude/platform_irix6.x_g++.GNU b/include/makeinclude/platform_irix6.x_g++.GNU
index 0541ebf6ad2..e5c0202dcdf 100644
--- a/include/makeinclude/platform_irix6.x_g++.GNU
+++ b/include/makeinclude/platform_irix6.x_g++.GNU
@@ -14,7 +14,12 @@ endif
CC = gcc
CXX = g++
CFLAGS += $(DCFLAGS)
-CCFLAGS += $(CFLAGS) -fno-implicit-templates
+
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
DCFLAGS += -g
DLD = $(CXX)
LD = $(CXX)
diff --git a/include/makeinclude/platform_linux.GNU b/include/makeinclude/platform_linux.GNU
index c33af9cc4ab..3debe56c454 100644
--- a/include/makeinclude/platform_linux.GNU
+++ b/include/makeinclude/platform_linux.GNU
@@ -60,35 +60,9 @@ CC = gcc
CXX = g++
endif
-CXX_VERSION := $(shell $(CXX) -dumpversion)
-
-# If no option has been specified, try to enable implicit_templates based
-# on the version of the compiler.
+# Test for template instantiation.
#
-ifeq ($(implicit_templates),)
- ifeq (2.95,$(findstring 2.95,$(CXX_VERSION)))
- implicit_templates = 1
- else
- ifeq (3.,$(findstring 3.,$(CXX_VERSION)))
- implicit_templates = 1
- else
- ifeq (2.96,$(findstring 2.96,$(CXX_VERSION)))
- implicit_templates = 1
- else
- implicit_templates = 0
- endif
- endif
- endif
-endif
-
-# User didn't specify and we couldn't guess if this version of the compiler
-# works fine with implicit template instantiation. Turn if off.
-#
-ifeq ($(implicit_templates),0)
- ifeq ($(IMPLICIT_TEMPLATES_FLAG),) # Turn on flags if none is speficied.
- IMPLICIT_TEMPLATES_FLAG=-fno-implicit-templates
- endif
-endif
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
CFLAGS += -W -Wall -Wpointer-arith -pipe
ifeq ($(threads),1)
@@ -96,7 +70,7 @@ ifeq ($(threads),1)
$(PLATFORM_AIO_SUPPORT)
endif # threads
-CCFLAGS += $(CFLAGS) $(IMPLICIT_TEMPLATES_FLAG)
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
DCFLAGS += -g
DLD = $(CXX)
LD = $(CXX)
diff --git a/include/makeinclude/platform_osf1_4.x_g++.GNU b/include/makeinclude/platform_osf1_4.x_g++.GNU
index 0f3f03b02ae..1605e4fa2ff 100644
--- a/include/makeinclude/platform_osf1_4.x_g++.GNU
+++ b/include/makeinclude/platform_osf1_4.x_g++.GNU
@@ -25,7 +25,12 @@ endif
CC = gcc
CXX = g++
CFLAGS += -D_REENTRANT
-CCFLAGS += $(CFLAGS) -fno-implicit-templates -fno-strict-prototypes
+
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG) -fno-strict-prototypes
DCFLAGS += -g
LD = $(CXX)
DLD = $(CXX)
diff --git a/include/makeinclude/platform_psosim_g++.GNU b/include/makeinclude/platform_psosim_g++.GNU
index 3918f3c4122..674098fa3a2 100644
--- a/include/makeinclude/platform_psosim_g++.GNU
+++ b/include/makeinclude/platform_psosim_g++.GNU
@@ -28,7 +28,12 @@ optimize = 1
CC = gcc
CXX = g++
CFLAGS += -W -Wall -Wpointer-arith -pipe #### -Winline
-CCFLAGS += $(CFLAGS) -fno-implicit-templates
+
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
# -w suppresses warnings
# -H tells you which header files are being included
@@ -53,5 +58,3 @@ SOFLAGS = -G $(CPPFLAGS)
SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<
PRELIB = @true
INCLDIRS += -I$(PSS_ROOT)/include -I$(PSS_BSP) -I$(ACE_ROOT)/ace
-
-
diff --git a/include/makeinclude/platform_rtems.x_g++.GNU b/include/makeinclude/platform_rtems.x_g++.GNU
index df0b0515847..70ccdfbab0d 100644
--- a/include/makeinclude/platform_rtems.x_g++.GNU
+++ b/include/makeinclude/platform_rtems.x_g++.GNU
@@ -34,12 +34,16 @@ ifeq (,$(PERL_PATH))
endif # ! PERL_PATH
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
#### BEGIN target CPU-specific settings
# look them up
CFLAGS = $(shell make --no-print-directory -f $(ACE_ROOT)/include/makeinclude/Makefile.rtems print_cflags)
#CCFLAGS = $(shell make --no-print-directory -f $(ACE_ROOT)/include/makeinclude/Makefile.rtems print_cflags) -fno-implicit-templates
-CCFLAGS = -fno-implicit-templates
+CCFLAGS = $(TEMPLATES_FLAG)
#### END target CPU-specific settings
@@ -54,7 +58,7 @@ endif # ! ACE_CC_VERSION
ifeq (egcs,$(findstring egcs,$(ACE_CC_VERSION)))
ACE_HAS_GNUG_PRE_2_8 := 0
- CFLAGS +=
+ CFLAGS +=
ifneq (1,$(exceptions))
#### With exceptions, this is applied in wrapper_macros.GNU.
#### Without, we do it here.
@@ -72,7 +76,7 @@ ifeq (,$(rtti))
endif # rtti
DCFLAGS += -g
DLD = $(LD)
-INCLDIRS +=
+INCLDIRS +=
# Hand build tests/rtems_init.o .. something like this
# sparc-rtems-gcc -B/opt/rtems/sparc-rtems/erc32/lib/ -specs bsp_specs \
# -qrtems -mcpu=cypress -O -g \
diff --git a/include/makeinclude/platform_sco5.0.0-mit-pthread.GNU b/include/makeinclude/platform_sco5.0.0-mit-pthread.GNU
index f43397bf5ed..76781ca8c07 100644
--- a/include/makeinclude/platform_sco5.0.0-mit-pthread.GNU
+++ b/include/makeinclude/platform_sco5.0.0-mit-pthread.GNU
@@ -16,7 +16,12 @@ CC = gcc
LDLIBS += -L $(ACE_ROOT)/ace -L ./ -lACE # -z muldefs
CXX = g++
CFLAGS += -melf -w
-CCFLAGS += -melf -fPIC -Xpg4plus -fno-implicit-templates -I ${MIT_PTHREADS_DIR}/include -I /usr/progressive/lib/g++-include
+
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
+CCFLAGS += -melf -fPIC -Xpg4plus $(TEMPLATES_FLAG) -I ${MIT_PTHREADS_DIR}/include -I /usr/progressive/lib/g++-include
DCFLAGS += -gstabs
DCCFLAGS += $(DCFLAGS)
DLD = $(CXX)
@@ -29,7 +34,7 @@ AR = ar
ARFLAGS = ruv
RANLIB = /bin/true
-SOFLAGS = $(CPPFLAGS) -melf -fPIC -G
+SOFLAGS = $(CPPFLAGS) -melf -fPIC -G
SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<
# SOLINK = $(SOLINK.cc) -o $@ $(LDFLAGS) $<
PRELIB = @true
diff --git a/include/makeinclude/platform_sco5.0.0-nothread.GNU b/include/makeinclude/platform_sco5.0.0-nothread.GNU
index 6267de6e682..59544df65b0 100644
--- a/include/makeinclude/platform_sco5.0.0-nothread.GNU
+++ b/include/makeinclude/platform_sco5.0.0-nothread.GNU
@@ -1,6 +1,6 @@
# $Id$
#
-# NOTE: the above file from ACE 4.6 has been modified by Mike P. to get rid of
+# NOTE: the above file from ACE 4.6 has been modified by Mike P. to get rid of
# thread related stuff until we can obtain fsu-threads library.
# Requires gcc 2.7.2 Skunkware 97
@@ -12,10 +12,15 @@ optimize = 1
CC = gcc
# for no threads
-LDLIBS += -lm -L $(ACE_ROOT)/ace
+LDLIBS += -lm -L $(ACE_ROOT)/ace
CXX = g++
-CFLAGS += -melf -w
-CCFLAGS += -melf -fno-implicit-templates
+CFLAGS += -melf -w
+
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
+CCFLAGS += -melf $(TEMPLATES_FLAG)
# -g option not supported for C++ on systems using the DWARF debugging format
#DCFLAGS += -g
DCCFLAGS += $(DCFLAGS)
diff --git a/include/makeinclude/platform_sunos4_g++.GNU b/include/makeinclude/platform_sunos4_g++.GNU
index 2b24925fbcf..de94c799aca 100644
--- a/include/makeinclude/platform_sunos4_g++.GNU
+++ b/include/makeinclude/platform_sunos4_g++.GNU
@@ -5,10 +5,15 @@
debug = 1
optimize = 1
-CC = gcc
+CC = gcc
CXX = g++
CFLAGS += -fno-strict-prototypes
-CCFLAGS += $(CFLAGS) -fno-implicit-templates
+
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
DCFLAGS += -g
DLD = /bin/ld
LD = $(CXX)
@@ -19,7 +24,7 @@ PIC = -fpic
AR = ar
ARFLAGS = ruv
RANLIB = ranlib
-SOFLAGS = -assert pure-text
+SOFLAGS = -assert pure-text
# SOBUILD - compile into .so directly
SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<
# SOLINK = $(SOLINK.cc) -o $@ $(LDFLAGS) $<
diff --git a/include/makeinclude/platform_sunos5_g++.GNU b/include/makeinclude/platform_sunos5_g++.GNU
index 3c03bae0876..8ba9b0a75bc 100644
--- a/include/makeinclude/platform_sunos5_g++.GNU
+++ b/include/makeinclude/platform_sunos5_g++.GNU
@@ -45,11 +45,15 @@ CC = gcc
CXX = g++
CFLAGS += -W -Wall -Wpointer-arith -pipe #### -Winline
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
ifeq ($(threads),1)
CPPFLAGS += -D_REENTRANT
endif
-CCFLAGS += $(CFLAGS) -fno-implicit-templates
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
DLD = $(CXX)
LD = $(CXX)
LDFLAGS +=
diff --git a/include/makeinclude/platform_unixware_g++.GNU b/include/makeinclude/platform_unixware_g++.GNU
index 75a93fb07e4..6ef0d00b0ea 100644
--- a/include/makeinclude/platform_unixware_g++.GNU
+++ b/include/makeinclude/platform_unixware_g++.GNU
@@ -17,14 +17,13 @@ threads = 1
CC = gcc
CXX = g++
-#CFLAGS += #-frepo -fexternal-templates
-#CFLAGS += -D__STDC__=0
-#CCFLAGS += $(CFLAGS) -fno-implicit-templates
-#CCFLAGS += $(CFLAGS) #-fexceptions #-fno-implicit-templates or -frepo
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
CFLAGS += -W -Wall -Wpointer-arith -pipe #### -Winline
-CCFLAGS += $(CFLAGS) -fno-implicit-templates
+CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
ACE_GNUG_ON_UNIXWARE = 1
diff --git a/include/makeinclude/platform_vxworks5.x_g++.GNU b/include/makeinclude/platform_vxworks5.x_g++.GNU
index 14a66989af9..0ba76c03460 100644
--- a/include/makeinclude/platform_vxworks5.x_g++.GNU
+++ b/include/makeinclude/platform_vxworks5.x_g++.GNU
@@ -34,6 +34,17 @@ endif # ! rtti
shared_libs =
static_libs = 1
+# I (kitty) don't want to touch this file with regard to template
+# instantiation. If somebody has access to the platforms specified here,
+# they are welcome to check the instantiation problem. Overriding it to be
+# explicit.
+#
+templates = "explicit"
+
+# Test for template instantiation.
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
ifeq (,$(WIND_BASE))
default:
@ERROR: you must set your WIND_BASE environment variable
@@ -79,56 +90,56 @@ endif # default CPU
ifeq ($(CPU),SH7700)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=SH7700 -m3
- CCFLAGS += -fno-implicit-templates
+ CCFLAGS += $(TEMPLATES_FLAG)
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/sh-wrs-vxworks/gcc-2.96
TOOLENV = sh
else
ifeq ($(CPU),SH7700LE)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=SH7700 -m3 -ml
- CCFLAGS += -fno-implicit-templates
+ CCFLAGS += $(TEMPLATES_FLAG)
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/sh-wrs-vxworks/gcc-2.96
TOOLENV = sh
else
ifeq ($(CPU),SH7750)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=SH7750 -m4
- CCFLAGS += -fno-implicit-templates
+ CCFLAGS += $(TEMPLATES_FLAG)
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/sh-wrs-vxworks/gcc-2.96
TOOLENV = sh
else
ifeq ($(CPU),SH7750LE)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=SH7750 -m4 -ml -mspace
- CCFLAGS += -fno-implicit-templates
+ CCFLAGS += $(TEMPLATES_FLAG)
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/sh-wrs-vxworks/gcc-2.96
TOOLENV = sh
else
ifeq ($(CPU),PPC403)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=PPC403 -mcpu=403
- CCFLAGS += -fno-implicit-templates
+ CCFLAGS += $(TEMPLATES_FLAG)
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/powerpc-wrs-vxworks/cygnus-2.7.2-960126
TOOLENV = ppc
else
ifeq ($(CPU),PPC604)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=PPC604
- CCFLAGS += -fno-implicit-templates -mlongcall
+ CCFLAGS += $(TEMPLATES_FLAG) -mlongcall
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/powerpc-wrs-vxworks/cygnus-2.7.2-960126
TOOLENV = ppc
else
ifeq ($(CPU),PPC603)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=PPC603
- CCFLAGS += -fno-implicit-templates -mlongcall
+ CCFLAGS += $(TEMPLATES_FLAG) -mlongcall
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/powerpc-wrs-vxworks/cygnus-2.7.2-960126
TOOLENV = ppc
else
ifeq ($(CPU),PPC860)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=PPC860 -mcpu=860
- CCFLAGS += -fno-implicit-templates -mlongcall
+ CCFLAGS += $(TEMPLATES_FLAG) -mlongcall
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/powerpc-wrs-vxworks/cygnus-2.7.2-960126
TOOLENV = ppc
else
@@ -136,7 +147,7 @@ ifeq ($(CPU),SIMNT)
BINXSYM_NAME = xsym
CFLAGS += -U__WINNT -UWIN32 -U__WINNT__ -UWINNT -U__MINGW32__ -U_WIN32 \
-U__WIN32 -U__WIN32__ -U__WIN32 -B$(GCCLIB_DIR) -DCPU=SIMNT
- CCFLAGS += -fno-implicit-templates
+ CCFLAGS += $(TEMPLATES_FLAG)
GCCLIB_DIR = \
$(HOST_DIR)/lib/gcc-lib/powerpc-wrs-vxworks/cygnus-2.7.2-960126
TOOLENV = simpc
@@ -169,7 +180,7 @@ else
ifeq ($(CPU),SIMSPARCSOLARIS)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=SIMSPARCSOLARIS
- CCFLAGS += -fno-implicit-templates
+ CCFLAGS += $(TEMPLATES_FLAG)
GCCLIB_DIR = \
$(HOST_DIR)/lib/gcc-lib/sparc-sun-solaris2.5.1/cygnus-2.7.2-960126
TOOLENV = simso
@@ -177,39 +188,39 @@ else
ifeq ($(CPU),SPARC)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=SPARC
- CCFLAGS += -fno-implicit-templates
+ CCFLAGS += $(TEMPLATES_FLAG)
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/sparc-wrs-vxworks/cygnus-2.7.2-960126
TOOLENV = sparc
else
ifeq ($(CPU),MC68020)
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=MC68020 -m68020 -m68881
- CCFLAGS += -fno-implicit-templates -DACE_VXWORKS=0x540
+ CCFLAGS += $(TEMPLATES_FLAG) -DACE_VXWORKS=0x540
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/m68k-wrs-vxworks/cygnus-2.7.2-960126
TOOLENV = 68k
else
ifeq ($(CPU),MC68030)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=MC68030 -m68030 -m68881
- CCFLAGS += -fno-implicit-templates -DACE_VXWORKS=0x540
+ CCFLAGS += $(TEMPLATES_FLAG) -DACE_VXWORKS=0x540
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/m68k-wrs-vxworks/cygnus-2.7.2-960126
TOOLENV = 68k
else
ifeq ($(CPU),MC68040)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=MC68040 -m68040 -m68881
- CCFLAGS += -fno-implicit-templates -DACE_VXWORKS=0x540
+ CCFLAGS += $(TEMPLATES_FLAG) -DACE_VXWORKS=0x540
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/m68k-wrs-vxworks/cygnus-2.7.2-960126
TOOLENV = 68k
else
ifeq ($(CPU),MC68060)
BINXSYM_NAME = xsym
CFLAGS += -B$(GCCLIB_DIR)/ -DCPU=MC68060 -m68040 -m68881
- CCFLAGS += -fno-implicit-templates -DACE_VXWORKS=0x540
+ CCFLAGS += $(TEMPLATES_FLAG) -DACE_VXWORKS=0x540
GCCLIB_DIR = $(HOST_DIR)/lib/gcc-lib/m68k-wrs-vxworks/cygnus-2.7.2-960126
TOOLENV = 68k
else
BINXSYM_NAME = xsym
- CCFLAGS += -fno-implicit-templates
+ CCFLAGS += $(TEMPLATES_FLAG)
endif # MC68060
endif # MC68040
endif # MC68030
@@ -296,7 +307,7 @@ ifeq (egcs,$(findstring egcs,$(ACE_CC_VERSION)))
CFLAGS += -DACE_VXWORKS=0x540
ifeq ($(TOOLENV),386)
#### Tornado II should support -fno-implicit-templates for pc486.
- CCFLAGS += -fno-implicit-templates
+ CCFLAGS += $(TEMPLATES_FLAG)
endif # 386
ifneq (1,$(exceptions))
#### With exceptions, this is applied in wrapper_macros.GNU.
diff --git a/include/makeinclude/wrapper_macros.GNU b/include/makeinclude/wrapper_macros.GNU
index 328221a183e..f0feac1b4c8 100644
--- a/include/makeinclude/wrapper_macros.GNU
+++ b/include/makeinclude/wrapper_macros.GNU
@@ -28,6 +28,10 @@
# fast Enable -fast option, e.g., with Sun C++.
# inline Enable ACE inlining. Some platforms enable inlining by
# default, others do not.
+# templates Type of template instantiation to perform. Can be one of
+# automatic, used, explicit. Defaults to automatic if the
+# platform/compiler combination supports it, otherwise is
+# set to explicit.
# optimize Enable optimization; see OCFLAGS and OCCFLAGS.
# pace Enable PACE as the underpinnings of ACE_OS.
# probe Enable ACE_Timeprobes.
@@ -94,6 +98,8 @@
# DLD Name of dynamic linker
# LD Name of linker
# IDL Name of the CORBA IDL compiler
+# TEMPLATES_FLAG Flag to pass to the compiler to control the instantiation of
+# templates.
# INSBIN Binary (executable) installation directory
# INSINC Include file installation directory
# INSMAN Manpage installation directory