Kaydet (Commit) daacd89b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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: 's avatarStephan Bergmann <sbergman@redhat.com>
üst f9905401
......@@ -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:
# 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment