summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-09-21 21:56:06 +0000
committerBernard Normier <bernard@zeroc.com>2016-09-21 21:56:06 +0000
commit2154123b5c1740a8a4186ebc7f41b9e3e740997e (patch)
tree0d723acf65878cb536e6f1bee7e94a220ad86df9 /cpp
parentUse GRADLEOPTS in Java Makefiles (diff)
downloadice-2154123b5c1740a8a4186ebc7f41b9e3e740997e.tar.bz2
ice-2154123b5c1740a8a4186ebc7f41b9e3e740997e.tar.xz
ice-2154123b5c1740a8a4186ebc7f41b9e3e740997e.zip
No ++11 lib suffix with GCC 6+
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/Ice/DynamicLibrary.cpp14
-rw-r--r--cpp/test/IceGrid/noRestartUpdate/AllTests.cpp2
2 files changed, 10 insertions, 6 deletions
diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp
index a62fe7093df..714e042a9a5 100644
--- a/cpp/src/Ice/DynamicLibrary.cpp
+++ b/cpp/src/Ice/DynamicLibrary.cpp
@@ -15,6 +15,10 @@
# include <dlfcn.h>
#endif
+#if defined(ICE_CPP11) && defined(__GNUC__) && (__GNUC__ < 6) && defined(__GLIBCXX__)
+# define ICE_LIBSUFFIX "++11"
+#endif
+
using namespace Ice;
using namespace IceInternal;
using namespace std;
@@ -89,8 +93,8 @@ IceInternal::DynamicLibrary::loadEntryPoint(const string& entryPoint, bool useIc
if(comma == string::npos)
{
libName = libSpec;
-# if defined(ICE_CPP11) && defined(__GLIBCXX__)
- libName += "++11";
+# ifdef ICE_LIBSUFFIX
+ libName += ICE_LIBSUFFIX;
# endif
if(useIceVersion)
{
@@ -119,9 +123,9 @@ IceInternal::DynamicLibrary::loadEntryPoint(const string& entryPoint, bool useIc
return 0;
}
libName = libSpec.substr(0, comma);
-# if defined(ICE_CPP11) && defined(__GLIBCXX__)
- libName += "++11";
-# endif
+#ifdef ICE_LIBSUFFIX
+ libName += ICE_LIBSUFFIX;
+#endif
version = libSpec.substr(comma + 1);
}
diff --git a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp
index 5175cc843a5..f0bf89f6f65 100644
--- a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp
+++ b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp
@@ -544,7 +544,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
# if defined(__i386)
iceboxExe += "32";
# endif
-# if defined(ICE_CPP11)
+# if defined(ICE_CPP11) && defined(__GNUC__) && (__GNUC__ < 6)
iceboxExe += "++11";
# endif
#endif