diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-05-16 13:55:02 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-05-16 16:04:17 +0200 |
commit | daacd89b7513e533e1890526eabdf10c01576596 (patch) | |
tree | 51de3578e7f1bfcd844697509c0021b74884e917 /external/libodfgen | |
parent | tdf#125170 Deliver mouse events also when clicking into document content (diff) | |
download | core-daacd89b7513e533e1890526eabdf10c01576596.tar.gz core-daacd89b7513e533e1890526eabdf10c01576596.zip |
external/libodfgen: Honor -std=... passed in via CXXFLAGS
...which fixes an issue encountered when compiling with Clang against trunk
libstdc++ (which contains pre-C++17-only code that triggers
<https://bugs.llvm.org/show_bug.cgi?id=41896> "Bogus 'error: no return statement
in constexpr function' when void return type is 'templated'")
Change-Id: I33368996c8ac8cf32893ba1b631ace2a606dafb1
Reviewed-on: https://gerrit.libreoffice.org/72409
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/libodfgen')
-rw-r--r-- | external/libodfgen/UnpackedTarball_libodfgen.mk | 4 | ||||
-rw-r--r-- | external/libodfgen/c++11.patch | 44 |
2 files changed, 48 insertions, 0 deletions
diff --git a/external/libodfgen/UnpackedTarball_libodfgen.mk b/external/libodfgen/UnpackedTarball_libodfgen.mk index 80ccbf73bfd5..ee4ed647cb9a 100644 --- a/external/libodfgen/UnpackedTarball_libodfgen.mk +++ b/external/libodfgen/UnpackedTarball_libodfgen.mk @@ -35,8 +35,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \ endif endif +# * external/libodfgen/c++11.patch: obsoleted upstream by +# <https://sourceforge.net/p/libwpd/libodfgen/ci/e11112e50562de4f3252227bfba175ededf82194/> +# "boost::shared_ptr -> std::shared_ptr" $(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \ external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1 \ + external/libodfgen/c++11.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libodfgen/c++11.patch b/external/libodfgen/c++11.patch new file mode 100644 index 000000000000..f41d1a166964 --- /dev/null +++ b/external/libodfgen/c++11.patch @@ -0,0 +1,44 @@ +# Add -std=c++11 before existing CXXFLAGS, in case those already contain some -std= (which will thus +# override the preceding -std=c++11, which is likely what the caller passing in those CXXFLAGS +# intends): +# +#--- configure.ac +#+++ configure.ac +#@@ -217,7 +217,7 @@ +# AS_IF([test "x$with_sharedptr" = "xc++11"], [ +# AC_MSG_CHECKING([for c++11 shared ptr]) +# save_CXXFLAGS="$CXXFLAGS" +#- CXXFLAGS="$CXXFLAGS -std=c++11" +#+ CXXFLAGS="-std=c++11 $CXXFLAGS" +# AC_COMPILE_IFELSE([ +# AC_LANG_PROGRAM( +# [[#include <memory>]], +#@@ -241,7 +241,7 @@ +# AC_MSG_RESULT([no]) +# ], [ +# AC_MSG_RESULT([yes]) +#- CXXFLAGS="$CXXFLAGS -std=c++11" +#+ CXXFLAGS="-std=c++11 $CXXFLAGS" +# ]) +# ]) +# AS_IF([test "x$with_sharedptr" = "xtr1"], [ +--- configure ++++ configure +@@ -16723,7 +16723,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c++11 shared ptr" >&5 + $as_echo_n "checking for c++11 shared ptr... " >&6; } + save_CXXFLAGS="$CXXFLAGS" +- CXXFLAGS="$CXXFLAGS -std=c++11" ++ CXXFLAGS="-std=c++11 $CXXFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -16780,7 +16780,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +- CXXFLAGS="$CXXFLAGS -std=c++11" ++ CXXFLAGS="-std=c++11 $CXXFLAGS" + + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |