[Libreoffice-commits] core.git: configure.ac external/libebook

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Dec 7 14:50:33 UTC 2018


 configure.ac                                  |    2 -
 external/libebook/UnpackedTarball_libebook.mk |    4 --
 external/libebook/libebook-msvc.patch.1       |   46 --------------------------
 3 files changed, 1 insertion(+), 51 deletions(-)

New commits:
commit 50cb96346ad54bcdb172acf11b4befe540e2b152
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Dec 7 10:19:24 2018 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Dec 7 15:50:05 2018 +0100

    Use correct __cplusplus value with MSVC
    
    ...now that /Zc:__cplusplus is available in Visual Studio 2017 version 15.7
    (see <https://blogs.msdn.microsoft.com/vcblog/2018/04/09/
    msvc-now-correctly-reports-__cplusplus/>).
    
    Some external projects might run into issues when picking up /Zc:__cplusplus
    directly with $(CXXFLAGS_CXX11) or indirectly via $(gb_CXXFLAGS) now, but that
    appears not to be the case.
    
    Some obsolete MSVC-specific __cplusplus checks can be removed now.  (The ones in
    external/libebook/libebook-msvc.patch.1 pick up /Zc:__cplusplus via
    $(gb_CXXFLAGS) in external/libebook/ExternalProject_libebook.mk.)
    
    Change-Id: Idc6849a0000ea424522f30f61caba112fae25d40
    Reviewed-on: https://gerrit.libreoffice.org/64755
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/configure.ac b/configure.ac
index 44143a0c81a1..04bac9d771ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6208,7 +6208,7 @@ dnl ===================================================================
 AC_MSG_CHECKING([whether $CXX supports C++17])
 CXXFLAGS_CXX11=
 if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then
-    CXXFLAGS_CXX11=-std:c++17
+    CXXFLAGS_CXX11='-std:c++17 -Zc:__cplusplus'
 elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
     my_flags='-std=gnu++2a -std=c++2a -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z'
     for flag in $my_flags; do
diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk
index 7b6977fe76ab..af2ddea28ae1 100644
--- a/external/libebook/UnpackedTarball_libebook.mk
+++ b/external/libebook/UnpackedTarball_libebook.mk
@@ -15,10 +15,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libebook))
 
-$(eval $(call gb_UnpackedTarball_add_patches,libebook, \
-	external/libebook/libebook-msvc.patch.1 \
-))
-
 ifeq ($(COM_IS_CLANG),TRUE)
 ifneq ($(filter -fsanitize=%,$(CC)),)
 $(eval $(call gb_UnpackedTarball_add_patches,libebook, \
diff --git a/external/libebook/libebook-msvc.patch.1 b/external/libebook/libebook-msvc.patch.1
deleted file mode 100644
index d14b122f9575..000000000000
--- a/external/libebook/libebook-msvc.patch.1
+++ /dev/null
@@ -1,46 +0,0 @@
-From 49f6461d4751d3b16e32ab8f9c93a3856b33be49 Mon Sep 17 00:00:00 2001
-From: Miklos Vajna <vmiklos at collabora.co.uk>
-Date: Wed, 2 Aug 2017 14:53:36 +0200
-Subject: [PATCH] m4: MSVC defines __cplusplus as 199711L still
-
-See e.g.
-<https://stackoverflow.com/questions/37503029/cplusplus-is-equal-to-199711-in-msvc-does-it-support-c11>,
-on MSVC we can't depend on the value of __cplusplus, since that one is a
-too low value, even if everything else works fine.
----
- m4/ax_cxx_compile_stdcxx.m4 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff -Naur a/configure b/configure
---- a/configure	2017-08-02 14:50:09.000000000 +0200
-+++ b/configure	2017-08-02 14:50:57.000000000 +0200
-@@ -16001,7 +16001,7 @@
- 
- #error "This is not a C++ compiler"
- 
--#elif __cplusplus < 201103L
-+#elif __cplusplus < 201103L && !(defined _MSC_VER)
- 
- #error "This is not a C++11 compiler"
- 
-@@ -16314,7 +16314,7 @@
- 
- #error "This is not a C++ compiler"
- 
--#elif __cplusplus < 201103L
-+#elif __cplusplus < 201103L && !(defined _MSC_VER)
- 
- #error "This is not a C++11 compiler"
- 
-@@ -16636,7 +16636,7 @@
- 
- #error "This is not a C++ compiler"
- 
--#elif __cplusplus < 201103L
-+#elif __cplusplus < 201103L && !(defined _MSC_VER)
- 
- #error "This is not a C++11 compiler"
- 
--- 
-2.12.3
-


More information about the Libreoffice-commits mailing list