summaryrefslogtreecommitdiff
path: root/ACE/include/makeinclude/platform_gnuwin32_common.GNU
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/include/makeinclude/platform_gnuwin32_common.GNU')
-rw-r--r--ACE/include/makeinclude/platform_gnuwin32_common.GNU30
1 files changed, 24 insertions, 6 deletions
diff --git a/ACE/include/makeinclude/platform_gnuwin32_common.GNU b/ACE/include/makeinclude/platform_gnuwin32_common.GNU
index 4f799811eac..502a77e4058 100644
--- a/ACE/include/makeinclude/platform_gnuwin32_common.GNU
+++ b/ACE/include/makeinclude/platform_gnuwin32_common.GNU
@@ -95,9 +95,32 @@ PLATFORM_WX_CPPFLAGS ?= $(shell wx-config --cxxflags) -I/usr/local/include
PLATFORM_WX_LIBS ?= $(shell wx-config --libs)
PLATFORM_WX_LDFLAGS ?= $(shell wx-config --ldflags)
+# Test for template instantiation, add to SOFLAGS if SONAME set,
+# add -E to LDFLAGS if using GNU ld
+#
+include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
+
+ifeq ($(GXX_4_OR_BETTER), 1)
+ ifeq ($(findstring $(CXX_MINOR_VERSION),5 6 7 8 9),$(CXX_MINOR_VERSION))
+ GXX_4_5_OR_BETTER:=1
+ endif
+endif
+GXX_4_5_OR_BETTER?=0
+
# The sed below is to strip comments on the .def file,
# to workaround to a bug in ld.
CMDSEP ?= ;
+ifeq ($(GXX_4_5_OR_BETTER), 1)
+SHLIBBUILD = \
+ $(RM) $(VSHDIR)/$@.def.old $(VSHDIR)/$@.def $(CMDSEP) \
+ $(DLLTOOL) --no-export-all --output-def $(VSHDIR)/$@.def --dllname $@ \
+ $(VSHOBJS) \
+ && mv $(VSHDIR)/$@.def $(VSHDIR)/$@.def.old \
+ && sed "s/;.*$$//g" < $(VSHDIR)/$@.def.old > $(VSHDIR)/$@.def \
+ && $(SOLINK.cc) -Wl,--enable-auto-image-base -Wl,--out-implib,$@.a \
+ -shared -o $@ $(LDFLAGS) -Wl,$(VSHDIR)/$@.def \
+ $(VSHOBJS) $(ACE_SHLIBS) $(LIBS)
+else
SHLIBBUILD = \
$(RM) $(VSHDIR)/$@.def.old $(VSHDIR)/$@.def $(CMDSEP) \
$(DLLTOOL) --export-all --output-def $(VSHDIR)/$@.def --dllname $@ \
@@ -107,14 +130,9 @@ SHLIBBUILD = \
&& $(SOLINK.cc) -Wl,--enable-auto-image-base -Wl,--out-implib,$@.a \
-shared -o $@ $(LDFLAGS) -Wl,$(VSHDIR)/$@.def \
$(VSHOBJS) $(ACE_SHLIBS) $(LIBS)
-
+endif
PRELIB = @true
-# Test for template instantiation, add to SOFLAGS if SONAME set,
-# add -E to LDFLAGS if using GNU ld
-#
-include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
-
ifeq ($(GXX_4_OR_BETTER), 1)
no_attributes ?= 1
wall ?= 1