external/firebird/ExternalProject_firebird.mk | 2 external/firebird/UnpackedTarball_firebird.mk | 1 external/firebird/c++20.patch | 61 ++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-)
New commits: commit fdf7bd6c1cb8756d37813e72fbbec704d1c0f770 Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Wed Jan 17 21:11:54 2024 +0100 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Thu Jan 18 17:00:46 2024 +0100 Don't artificially limit external/firebird to -std=gnu++11 on Linux 0a42105a8d95473646b850eed6d428ebb93fc01f "firebird: fix CXXFLAGS" had added this to override Firebird's internal -std=gnu++03, but even back then the CXXFLAGS set there already included $(CXXFLAGS_CXX11) (so adding an explicit -std=gnu++11 should never have been necessary), and CXXFLAGS_CXX11 has by now moved beyond -std=gnu++11 to at least -std=c++20. Which reveals that the code has a C++20 incompatibility that only GCC so far complains about (see the mailing list thread starting at <https://lists.isocpp.org/std-discussion/2024/01/2482.php> "simple-template-id in a constructor declaration"), > In file included from /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/gpre/../gpre/../common/../jrd/../common/classes/fb_string.h:39, > from /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/gpre/../gpre/../common/../jrd/ods.h:38, > from /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/gpre/../gpre/../common/dsc.h:32, > from /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/gpre/../gpre/gpre.h:1514, > from /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/gpre/hsh.cpp:31: > /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/include/../common/classes/alloc.h:264:36: error: expected ')' before '*' token > 264 | SubsystemThreadData* subThreadData, > | ^ > | ) > /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/include/../common/classes/alloc.h:263:9: note: to match this '(' > 263 | ( > | ^ (<https://ci.libreoffice.org/job/gerrit_linux_gcc_release/157406/>), etc. Change-Id: I89839452a0d474467ae62e57b6c990354e10f142 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162209 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> diff --git a/external/firebird/ExternalProject_firebird.mk b/external/firebird/ExternalProject_firebird.mk index 29a71763600f..18ee97eb4409 100644 --- a/external/firebird/ExternalProject_firebird.mk +++ b/external/firebird/ExternalProject_firebird.mk @@ -86,7 +86,7 @@ $(call gb_ExternalProject_get_state_target,firebird,build): ) \ $(if $(HAVE_LIBCPP),CXX='$(CXX) -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR') \ && LC_ALL=C $(MAKE) \ - $(if $(ENABLE_DEBUG),Debug) SHELL='$(SHELL)' $(if $(filter LINUX,$(OS)),CXXFLAGS="$$CXXFLAGS -std=gnu++11") \ + $(if $(ENABLE_DEBUG),Debug) SHELL='$(SHELL)' $(if $(filter LINUX,$(OS)),CXXFLAGS="$$CXXFLAGS") \ MATHLIB="$(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_LIBS),-L$(call gb_UnpackedTarball_get_dir,libtommath) -ltommath)" \ LIBO_TUNNEL_LIBRARY_PATH='$(subst ','\'',$(subst $$,$$$$,$(call gb_Helper_extend_ld_path,$(call gb_UnpackedTarball_get_dir,icu)/source/lib)))' \ $(if $(filter MACOSX,$(OS)), \ diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk index 4a4d00fa0a76..821b167650d5 100644 --- a/external/firebird/UnpackedTarball_firebird.mk +++ b/external/firebird/UnpackedTarball_firebird.mk @@ -52,6 +52,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ external/firebird/configure-c99.patch \ external/firebird/Wincompatible-function-pointer-types.patch \ external/firebird/c++26.patch \ + external/firebird/c++20.patch \ )) ifeq ($(OS),WNT) diff --git a/external/firebird/c++20.patch b/external/firebird/c++20.patch new file mode 100644 index 000000000000..97168ce31838 --- /dev/null +++ b/external/firebird/c++20.patch @@ -0,0 +1,61 @@ +--- src/common/classes/Nullable.h ++++ src/common/classes/Nullable.h +@@ -113,19 +113,19 @@ + template <typename T> class Nullable : public BaseNullable<T> + { + public: +- explicit Nullable<T>(const T& v) ++ explicit Nullable(const T& v) + { + this->value = v; + this->specified = true; + } + +- Nullable<T>(const Nullable<T>& o) ++ Nullable(const Nullable<T>& o) + { + this->value = o.value; + this->specified = o.specified; + } + +- Nullable<T>() ++ Nullable() + { + NullableClear<T>::clear(this->value); + this->specified = false; +--- src/common/classes/alloc.h ++++ src/common/classes/alloc.h +@@ -259,7 +259,7 @@ + class SubsystemContextPoolHolder : public ContextPoolHolder + { + public: +- SubsystemContextPoolHolder <SubsystemThreadData, SubsystemPool> ++ SubsystemContextPoolHolder + ( + SubsystemThreadData* subThreadData, + SubsystemPool* newPool +--- src/common/classes/stack.h ++++ src/common/classes/stack.h +@@ -36,7 +36,7 @@ + class Stack : public AutoStorage + { + private: +- Stack<Object, Capacity>(Stack<Object, Capacity>&); // not implemented ++ Stack(Stack<Object, Capacity>&); // not implemented + + class Entry : public Vector<Object, Capacity> + { +@@ -117,11 +117,11 @@ + Entry* stk_cache; + + public: +- explicit Stack<Object, Capacity>(MemoryPool& p) ++ explicit Stack(MemoryPool& p) + : AutoStorage(p), stk(0), stk_cache(0) + { } + +- Stack<Object, Capacity>() : AutoStorage(), stk(0), stk_cache(0) { } ++ Stack() : AutoStorage(), stk(0), stk_cache(0) { } + + ~Stack() + {