diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-09-14 14:50:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-09-16 15:32:22 +0200 |
commit | 47e0180a55130bd698682ec12a6bb79fce88ec72 (patch) | |
tree | 2e70665af2f10e207f5642676479a7f1ef57e806 /external | |
parent | ef1827ff7c753500c0e94943e69ada0f22c1924f (diff) |
external/firebird: Work around std::auto_ptr gone from C++17
...which started to be an issue when building with recent Clang 16 trunk after
<https://github.com/llvm/llvm-project/commit/3e99b8d947ac024831e59be2b604ac67a24fed94>
"C++/ObjC++: switch to gnu++17 as the default standard" against libc++:
> src/cloop/Main.cpp:31:12: error: no member named 'auto_ptr' in namespace 'std'
> using std::auto_ptr;
> ~~~~~^
(Recent versions of GCC similarly default to C++17, but libstdc++ by default
still provides auto_ptr even for C++17.)
Adding -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR to CXXFLAGS didn't work, though,
as firebird apparently only honors CXXFLAGS during the configure step, but not
in its makefiles. So instead add it directly to CXX. (Adding /all/ the
CXXFLAGS to CXX caused issues at least on Windows, where
<https://ci.libreoffice.org/job/gerrit_windows/135851/> failed with
> Main.cpp
> C:\cygwin\home\tdf\jenkins\workspace\gerrit_windows\workdir\UnpackedTarball\firebird\extern\cloop\src\cloop\Expr.h(25): fatal error C1034: string: no include path set
etc. This probably needs a general clean-up, and the other *FLAGS passed into
the firebird build system might have a similar issue.)
Change-Id: Idf0a5243938fddfb8348cc960074e60dea775650
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139932
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/firebird/ExternalProject_firebird.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/external/firebird/ExternalProject_firebird.mk b/external/firebird/ExternalProject_firebird.mk index 35511951528c..0419109e7156 100644 --- a/external/firebird/ExternalProject_firebird.mk +++ b/external/firebird/ExternalProject_firebird.mk @@ -89,6 +89,7 @@ $(call gb_ExternalProject_get_state_target,firebird,build): $(shell expr '$(MAC_OS_X_VERSION_MIN_REQUIRED)' \ '<' 101200)), \ ac_cv_func_clock_gettime=no)) \ + $(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") \ MATHLIB="$(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_LIBS),-L$(call gb_UnpackedTarball_get_dir,libtommath) -ltommath)" \ |