[Libreoffice-commits] core.git: 5 commits - compilerplugins/Makefile-clang.mk config_host/config_global.h.in config_host.mk.in configure.ac helpcompiler/inc helpcompiler/Library_helplinker.mk include/osl solenv/gbuild xmlhelp/Library_ucpchelp1.mk xmlhelp/source
LuboÅ¡ LuÅák
l.lunak at suse.cz
Thu Jun 13 11:08:58 PDT 2013
compilerplugins/Makefile-clang.mk | 2
config_host.mk.in | 2
config_host/config_global.h.in | 2
configure.ac | 183 +++++++++++++++++---------
helpcompiler/Library_helplinker.mk | 6
helpcompiler/inc/HelpCompiler.hxx | 4
include/osl/diagnose.hxx | 4
solenv/gbuild/platform/mingw.mk | 2
solenv/gbuild/platform/solaris.mk | 2
solenv/gbuild/platform/unxgcc.mk | 2
xmlhelp/Library_ucpchelp1.mk | 6
xmlhelp/source/cxxhelp/provider/databases.hxx | 4
xmlhelp/source/cxxhelp/provider/db.hxx | 3
13 files changed, 143 insertions(+), 79 deletions(-)
New commits:
commit 5a8233df858bc06b1cec8f0bcd65333a743c098a
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Thu Jun 13 20:06:08 2013 +0200
fix libstdc++ C++11 ABI check with Clang
Do not confuse GCC and libstdc++ versions. Clang defines GCC
version #defines, so the old version was wrong for it. Correct __GLIBCXX__
values found from GCC/libstdc++ repository history.
Change-Id: I94f5250609f7c9a114b2d15093abc9ca4209b13f
diff --git a/configure.ac b/configure.ac
index 6a612f9..4b47a3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5584,16 +5584,22 @@ if test "$GCC" = "yes"; then
if test "$HAVE_CXX11" = TRUE; then
AC_MSG_CHECKING([whether using C++11 causes libstdc++ 4.7.0/4.7.1 ABI breakage])
- # This should check libstdc++ version, not gcc, but clang has incidentally C++11 support
- # disabled in this case by the __float128 case below.
+ AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#if __GNUC__ == 4 && __GNUC_MINOR__ == 7 && (__GNUC_PATCHLEVEL__ == 0 || __GNUC_PATCHLEVEL__ == 1)
-abi broken
+#include <list>
+#if !defined(__GLIBCXX__)
+/* ok */
+#elif __GLIBCXX__ < 20111004
+/* before breakage */
+#elif __GLIBCXX__ > 20120703
+/* after breakage */
#else
+abi broken
#endif
]])], [AC_MSG_RESULT(no, ok)],
[AC_MSG_RESULT(yes, disabling C++11)
HAVE_CXX11=])
+ AC_LANG_POP([C++])
fi
if test "$HAVE_CXX11" = TRUE; then
@@ -5643,7 +5649,7 @@ return !(i != 0 && j != 0);
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <vector>
- // some Clang fail when compiling against GCC 4.7 headers with -std=gnu++0x
+ // some Clang fail when compiling against libstdc++ headers with -std=gnu++0x
// (__float128)
]])
],[ AC_MSG_RESULT(yes) ],
@@ -5660,7 +5666,7 @@ return !(i != 0 && j != 0);
CXXFLAGS="$CXXFLAGS -D__float128=void"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <vector>
- // some Clang fail when compiling against GCC 4.7 headers with -std=gnu++0x
+ // some Clang fail when compiling against libstdc++ headers with -std=gnu++0x
// (__float128)
]])
],
commit 50d248aa3fe5132382676cc5c91e313b5aa1036b
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Thu Jun 13 19:29:32 2013 +0200
work around the C++11 __float128 problem with libstdc++ headers and clang
Change-Id: Ia1b443d22b3b7f6f93f1ad8c5fa760b0f1da3b83
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 34b9ac9..29ca356 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -73,7 +73,7 @@ CLANGOBJS=
define clangbuildsrc
$(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp
@echo [build CXX] $(subst $(SRCDIR)/,,$(2))
- $(QUIET)$(CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGDEFS) $(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC -std=c++11 -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
+ $(QUIET)$(CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGDEFS) $(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC $(CXXFLAGS_CXX11) -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
-include $(CLANGOUTDIR)/$(1).d
diff --git a/configure.ac b/configure.ac
index 07885b5..6a612f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5647,8 +5647,31 @@ return !(i != 0 && j != 0);
// (__float128)
]])
],[ AC_MSG_RESULT(yes) ],
- [ AC_MSG_RESULT(no)
- HAVE_CXX11=
+ [
+ AC_MSG_RESULT(no)
+ # The only reason why libstdc++ headers fail with Clang in C++11 mode is because
+ # they use the __float128 type that Clang doesn't know (libstdc++ checks whether
+ # __float128 is available during its build, but it's usually built using GCC,
+ # and so c++config.h hardcodes __float128 being supported). As the only place
+ # where __float128 is actually used is in a template specialization,
+ # -D__float128=void will avoid the problem there while still causing a problem
+ # if somebody actually uses the type.
+ AC_MSG_CHECKING([whether -D__float128=void workaround helps])
+ CXXFLAGS="$CXXFLAGS -D__float128=void"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <vector>
+ // some Clang fail when compiling against GCC 4.7 headers with -std=gnu++0x
+ // (__float128)
+]])
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -D__float128=void"
+ ],
+ [
+ AC_MSG_RESULT(no)
+ HAVE_CXX11=
+ ])
])
AC_LANG_POP([C++])
commit 44159c6cdf3127ef8ee628f07f3f2d38a93dc3b2
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Thu Jun 13 19:12:43 2013 +0200
split the 'can we use C++11' check into independent tests for each problem
Change-Id: If0fdc13b02ca6dd4eb67afee5b308d2e51a5b30d
diff --git a/configure.ac b/configure.ac
index 0e83a3b..07885b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5560,31 +5560,51 @@ dnl C++11
dnl ===================================================================
CXXFLAGS_CXX11=
+HAVE_CXX11=
if test "$GCC" = "yes"; then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ CXXFLAGS_CXX11=
+ AC_MSG_CHECKING([whether $CXX supports C++11])
+ for flag in -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x ; do
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS $flag -Werror"
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void f() {}]])],[CXXFLAGS_CXX11=$flag])
+ AC_LANG_POP([C++])
+ CXXFLAGS=$save_CXXFLAGS
+ if test -n "$CXXFLAGS_CXX11"; then
+ HAVE_CXX11=TRUE
+ break
+ fi
+ done
+ if test "$HAVE_CXX11" = TRUE; then
+ AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ if test "$HAVE_CXX11" = TRUE; then
+ AC_MSG_CHECKING([whether using C++11 causes libstdc++ 4.7.0/4.7.1 ABI breakage])
+ # This should check libstdc++ version, not gcc, but clang has incidentally C++11 support
+ # disabled in this case by the __float128 case below.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if __GNUC__ == 4 && __GNUC_MINOR__ == 7 && (__GNUC_PATCHLEVEL__ == 0 || __GNUC_PATCHLEVEL__ == 1)
+abi broken
#else
-abi ok
#endif
-]])],[HAVE_BROKEN_ABI=TRUE],[HAVE_BROKEN_ABI=FALSE])
+ ]])], [AC_MSG_RESULT(no, ok)],
+ [AC_MSG_RESULT(yes, disabling C++11)
+ HAVE_CXX11=])
+ fi
- AC_MSG_CHECKING([whether $CXX supports C++11 without Language Defect 757])
- # This should check libstdc++ version, not gcc, but clang has incidentally C++11 support
- # disabled in this case by the __float128 case below.
- if test "$HAVE_BROKEN_ABI" = "TRUE"; then
- AC_MSG_NOTICE([Not using -std=gnu++0x on $CXX version 4.7.0/4.7.1 due to libstdc++ ABI breakage.])
- else
+ if test "$HAVE_CXX11" = TRUE; then
+ AC_MSG_CHECKING([whether $CXX supports C++11 without Language Defect 757])
save_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+ CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stddef.h>
-#include <vector>
- // some Clang fail when compiling against GCC 4.7 headers with -std=gnu++0x
- // (__float128)
-
template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
namespace
@@ -5607,22 +5627,37 @@ size_t i = sizeof(sal_n_array_size(thinga));
size_t j = sizeof(sal_n_array_size(thingb));
return !(i != 0 && j != 0);
]])
- ],[
- HAVE_CXX11=TRUE
- if test "$CPP_LIBRARY" = LIBCPP -a $_os = Darwin; then
- : Already set CXX to contain -std=c++11
- else
- CXXFLAGS_CXX11=-std=gnu++0x
- fi
- ],[])
+ ], [ AC_MSG_RESULT(yes) ],
+ [ AC_MSG_RESULT(no)
+ HAVE_CXX11=
+ ])
+ AC_LANG_POP([C++])
+ CXXFLAGS=$save_CXXFLAGS
+ fi
+
+ if test "$HAVE_CXX11" = TRUE; then
+ AC_MSG_CHECKING([whether $CXX supports C++11 without __float128 compile error])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+ AC_LANG_PUSH([C++])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <vector>
+ // some Clang fail when compiling against GCC 4.7 headers with -std=gnu++0x
+ // (__float128)
+]])
+ ],[ AC_MSG_RESULT(yes) ],
+ [ AC_MSG_RESULT(no)
+ HAVE_CXX11=
+ ])
AC_LANG_POP([C++])
CXXFLAGS=$save_CXXFLAGS
fi
- if test "$HAVE_CXX11" = "TRUE"; then
- AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
- else
- AC_MSG_RESULT([no])
+
+ if test "$HAVE_CXX11" != "TRUE" -a -n "$CXXFLAGS_CXX11"; then
+ AC_MSG_NOTICE([Disabling C++11 support])
+ CXXFLAGS_CXX11=
fi
fi
@@ -5633,8 +5668,8 @@ dnl ==================================
dnl Check for C++11 "= delete" support
dnl ==================================
-AC_MSG_CHECKING([whether $CXX supports C++11 = delete syntax])
if test "$HAVE_CXX11" = "TRUE"; then
+ AC_MSG_CHECKING([whether $CXX supports C++11 = delete syntax])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
AC_LANG_PUSH([C++])
@@ -5653,16 +5688,14 @@ struct A
else
AC_MSG_RESULT([no])
fi
-else
- AC_MSG_RESULT([no])
fi
dnl ==================================
dnl Check for C++11 "override" support
dnl ==================================
-AC_MSG_CHECKING([whether $CXX supports C++11 "override" syntax])
if test "$HAVE_CXX11" = "TRUE"; then
+ AC_MSG_CHECKING([whether $CXX supports C++11 "override" syntax])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
AC_LANG_PUSH([C++])
@@ -5686,16 +5719,14 @@ struct B : A
else
AC_MSG_RESULT([no])
fi
-else
- AC_MSG_RESULT([no])
fi
dnl ==================================
dnl Check for C++11 "final" support
dnl ==================================
-AC_MSG_CHECKING([whether $CXX supports C++11 "final" syntax])
if test "$HAVE_CXX11" = "TRUE"; then
+ AC_MSG_CHECKING([whether $CXX supports C++11 "final" syntax])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
AC_LANG_PUSH([C++])
@@ -5755,30 +5786,30 @@ struct D : C
else
AC_MSG_RESULT([no])
fi
-else
- AC_MSG_RESULT([no])
fi
dnl ===================================================================
dnl Check for C++11 perfect forwarding support
dnl ===================================================================
-AC_MSG_CHECKING([whether $CXX supports C++11 perfect forwarding])
-save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
-AC_LANG_PUSH([C++])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+if test "$HAVE_CXX11" = "TRUE"; then
+ AC_MSG_CHECKING([whether $CXX supports C++11 perfect forwarding])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <utility>
template<typename T, typename... Args> T * f(Args &&... v) {
return new T(std::forward<Args>(v)...);
}
- ]], [[
+ ]], [[
f<int>(0);
- ]])], [perfect_forwarding=yes], [perfect_forwarding=no])
-AC_LANG_POP([C++])
-CXXFLAGS=$save_CXXFLAGS
-AC_MSG_RESULT([$perfect_forwarding])
-if test "$perfect_forwarding" = yes; then
- AC_DEFINE([HAVE_CXX11_PERFECT_FORWARDING])
+ ]])], [perfect_forwarding=yes], [perfect_forwarding=no])
+ AC_LANG_POP([C++])
+ CXXFLAGS=$save_CXXFLAGS
+ AC_MSG_RESULT([$perfect_forwarding])
+ if test "$perfect_forwarding" = yes; then
+ AC_DEFINE([HAVE_CXX11_PERFECT_FORWARDING])
+ fi
fi
dnl ===================================================================
commit d7ae9f7743d946845a8379e2fb47666f124e2c87
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Thu Jun 13 18:41:41 2013 +0200
rename HAVE_CXX0X->HAVE_CXX11 and clean up to #define in a config header
Change-Id: Id13e77fe890301a8510952994a91853568a7aea6
diff --git a/config_host.mk.in b/config_host.mk.in
index 9e35fcf..e7b541d 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -209,7 +209,7 @@ export GTK_PRINT_LIBS=$(gb_SPACE)@GTK_PRINT_LIBS@
export GUI=@GUI@
export GUIBASE=@GUIBASE@
export HARDLINKDELIVER=@HARDLINKDELIVER@
-export HAVE_CXX0X=@HAVE_CXX0X@
+export HAVE_CXX11=@HAVE_CXX11@
export HAVE_GCC_AVX=@HAVE_GCC_AVX@
export HAVE_GCC_BUILTIN_ATOMIC=@HAVE_GCC_BUILTIN_ATOMIC@
export HAVE_GCC_FINLINE_LIMIT=@HAVE_GCC_FINLINE_LIMIT@
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 02e284f..9b1b12a 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -12,6 +12,8 @@ Any change in this header will cause a rebuild of almost everything.
#ifndef CONFIG_GLOBAL_H
#define CONFIG_GLOBAL_H
+/* Prefer using a feature-specific check such as HAVE_CXX11_DELETE to the generic HAVE_CXX11. */
+#define HAVE_CXX11 0
#define HAVE_CXX11_DELETE 0
#define HAVE_CXX11_OVERRIDE 0
#define HAVE_CXX11_FINAL 0
diff --git a/configure.ac b/configure.ac
index fd2f544..0e83a3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5608,7 +5608,7 @@ size_t j = sizeof(sal_n_array_size(thingb));
return !(i != 0 && j != 0);
]])
],[
- HAVE_CXX0X=TRUE
+ HAVE_CXX11=TRUE
if test "$CPP_LIBRARY" = LIBCPP -a $_os = Darwin; then
: Already set CXX to contain -std=c++11
else
@@ -5619,7 +5619,7 @@ return !(i != 0 && j != 0);
AC_LANG_POP([C++])
CXXFLAGS=$save_CXXFLAGS
fi
- if test "$HAVE_CXX0X" = "TRUE"; then
+ if test "$HAVE_CXX11" = "TRUE"; then
AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
else
AC_MSG_RESULT([no])
@@ -5627,14 +5627,14 @@ return !(i != 0 && j != 0);
fi
AC_SUBST(CXXFLAGS_CXX11)
-AC_SUBST(HAVE_CXX0X)
+AC_SUBST(HAVE_CXX11)
dnl ==================================
dnl Check for C++11 "= delete" support
dnl ==================================
AC_MSG_CHECKING([whether $CXX supports C++11 = delete syntax])
-if test "$HAVE_CXX0X" = "TRUE"; then
+if test "$HAVE_CXX11" = "TRUE"; then
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
AC_LANG_PUSH([C++])
@@ -5662,7 +5662,7 @@ dnl Check for C++11 "override" support
dnl ==================================
AC_MSG_CHECKING([whether $CXX supports C++11 "override" syntax])
-if test "$HAVE_CXX0X" = "TRUE"; then
+if test "$HAVE_CXX11" = "TRUE"; then
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
AC_LANG_PUSH([C++])
@@ -5695,7 +5695,7 @@ dnl Check for C++11 "final" support
dnl ==================================
AC_MSG_CHECKING([whether $CXX supports C++11 "final" syntax])
-if test "$HAVE_CXX0X" = "TRUE"; then
+if test "$HAVE_CXX11" = "TRUE"; then
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
AC_LANG_PUSH([C++])
@@ -8035,7 +8035,7 @@ dnl ===================================================================
dnl Determine which hash container mdds shall use
dnl ===================================================================
AC_MSG_CHECKING([which hash container mdds shall use])
-if test "x$HAVE_CXX0X" = "xTRUE" -a "x$SYSTEM_MDDS" = "xYES"; then
+if test "x$HAVE_CXX11" = "xTRUE" -a "x$SYSTEM_MDDS" = "xYES"; then
MDDS_CPPFLAGS=$CXXFLAGS_CXX11
AC_MSG_RESULT([std::unordered_map])
else
diff --git a/helpcompiler/Library_helplinker.mk b/helpcompiler/Library_helplinker.mk
index 80c2d18..cd45eb0 100644
--- a/helpcompiler/Library_helplinker.mk
+++ b/helpcompiler/Library_helplinker.mk
@@ -19,12 +19,6 @@ $(eval $(call gb_Library_add_defs,helplinker,\
-DHELPLINKER_DLLIMPLEMENTATION \
))
-ifeq ($(HAVE_CXX0X),TRUE)
-$(eval $(call gb_Library_add_defs,helplinker,\
- -DHAVE_CXX0X \
-))
-endif
-
$(eval $(call gb_Library_use_libraries,helplinker,\
sal \
comphelper \
diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx
index 60fd277..b1e7ab8 100644
--- a/helpcompiler/inc/HelpCompiler.hxx
+++ b/helpcompiler/inc/HelpCompiler.hxx
@@ -20,8 +20,10 @@
#ifndef HELPCOMPILER_HXX
#define HELPCOMPILER_HXX
+#include <config_global.h>
+
#include <string>
-#ifndef HAVE_CXX0X
+#if !HAVE_CXX11
#define BOOST_NO_0X_HDR_TYPEINDEX
#endif
#include <boost/unordered_map.hpp>
diff --git a/include/osl/diagnose.hxx b/include/osl/diagnose.hxx
index bbf1fa7..c7a6aa8 100644
--- a/include/osl/diagnose.hxx
+++ b/include/osl/diagnose.hxx
@@ -24,7 +24,9 @@
#include <functional>
#include <typeinfo>
-#ifndef HAVE_CXX0X
+#include <config_global.h>
+
+#if !HAVE_CXX11
#define BOOST_NO_0X_HDR_TYPEINDEX
#endif
#include "boost/unordered_set.hpp"
diff --git a/solenv/gbuild/platform/mingw.mk b/solenv/gbuild/platform/mingw.mk
index 2a15506..9375a05 100644
--- a/solenv/gbuild/platform/mingw.mk
+++ b/solenv/gbuild/platform/mingw.mk
@@ -56,7 +56,7 @@ gb_CXXFLAGS += --sysroot=$(SYSBASE)
gb_CFLAGS += --sysroot=$(SYSBASE)
endif
-ifeq ($(HAVE_CXX0X),TRUE)
+ifeq ($(HAVE_CXX11),TRUE)
gb_CXXFLAGS += -std=gnu++0x
endif
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 38a7f1b..20fc2a9 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -86,7 +86,7 @@ gb_CFLAGS += -fno-strict-aliasing
gb_CXXFLAGS += -fno-strict-aliasing
endif
-ifeq ($(HAVE_CXX0X),TRUE)
+ifeq ($(HAVE_CXX11),TRUE)
#Currently, as well as for its own merits, c++11/c++0x mode allows use to use
#a template for SAL_N_ELEMENTS to detect at compiler time its misuse
gb_CXXFLAGS += -std=c++0x
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 4283a04..5b3805f 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -82,7 +82,7 @@ gb_CFLAGS += -fno-strict-aliasing
gb_CXXFLAGS += -fno-strict-aliasing
endif
-ifeq ($(HAVE_CXX0X),TRUE)
+ifeq ($(HAVE_CXX11),TRUE)
#Currently, as well as for its own merits, c++11/c++0x mode allows use to use
#a template for SAL_N_ELEMENTS to detect at compiler time its misuse
gb_CXXFLAGS += $(CXXFLAGS_CXX11)
diff --git a/xmlhelp/Library_ucpchelp1.mk b/xmlhelp/Library_ucpchelp1.mk
index f559cb1..9172d80 100644
--- a/xmlhelp/Library_ucpchelp1.mk
+++ b/xmlhelp/Library_ucpchelp1.mk
@@ -75,10 +75,4 @@ $(eval $(call gb_Library_add_exception_objects,ucpchelp1,\
xmlhelp/source/cxxhelp/util/Decompressor \
))
-ifeq ($(HAVE_CXX0X),TRUE)
-$(eval $(call gb_Library_add_defs,ucpchelp1,\
- -DHAVE_CXX0X \
-))
-endif
-
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 8585700..5c424c0 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -20,9 +20,11 @@
#ifndef _DATABASES_HXX_
#define _DATABASES_HXX_
+#include <config_global.h>
+
#include <set>
#include <vector>
-#ifndef HAVE_CXX0X
+#if !HAVE_CXX11
#define BOOST_NO_0X_HDR_TYPEINDEX
#endif
#include <boost/unordered_map.hpp>
diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx
index 7945591..f825b6d 100644
--- a/xmlhelp/source/cxxhelp/provider/db.hxx
+++ b/xmlhelp/source/cxxhelp/provider/db.hxx
@@ -21,7 +21,8 @@
#include "com/sun/star/ucb/XSimpleFileAccess3.hpp"
-#ifndef HAVE_CXX0X
+#include <config_global.h>
+#if !HAVE_CXX11
#define BOOST_NO_0X_HDR_TYPEINDEX
#endif
#include <boost/unordered_map.hpp>
commit 5fcd67d436d3a3a0f5332b5a5078e135e40c898b
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Thu Jun 13 18:22:11 2013 +0200
move C++11 check to stand alone
Change-Id: Ia1b22f1cd111a7008a023c1c9b60fa4e07832f24
diff --git a/configure.ac b/configure.ac
index a2f82db..fd2f544 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5459,9 +5459,8 @@ fi
AC_SUBST(HAVE_THREADSAFE_STATICS)
dnl ===================================================================
-dnl visibility and C++11 features
+dnl visibility and other gcc features
dnl ===================================================================
-CXXFLAGS_CXX11=
if test "$GCC" = "yes"; then
AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
save_CFLAGS=$CFLAGS
@@ -5550,7 +5549,18 @@ if test "$GCC" = "yes"; then
AC_MSG_RESULT([yes])
], [AC_MSG_RESULT([no])])
CFLAGS=$save_CFLAGS
+fi
+
+AC_SUBST(HAVE_GCC_NO_LONG_DOUBLE)
+AC_SUBST(HAVE_GCC_AVX)
+AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
+
+dnl ===================================================================
+dnl C++11
+dnl ===================================================================
+CXXFLAGS_CXX11=
+if test "$GCC" = "yes"; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if __GNUC__ == 4 && __GNUC_MINOR__ == 7 && (__GNUC_PATCHLEVEL__ == 0 || __GNUC_PATCHLEVEL__ == 1)
#else
@@ -5618,9 +5628,6 @@ fi
AC_SUBST(CXXFLAGS_CXX11)
AC_SUBST(HAVE_CXX0X)
-AC_SUBST(HAVE_GCC_NO_LONG_DOUBLE)
-AC_SUBST(HAVE_GCC_AVX)
-AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
dnl ==================================
dnl Check for C++11 "= delete" support
More information about the Libreoffice-commits
mailing list