summaryrefslogtreecommitdiffstats
path: root/external/firebird
diff options
context:
space:
mode:
Diffstat (limited to 'external/firebird')
-rw-r--r--external/firebird/ExternalProject_firebird.mk21
-rw-r--r--external/firebird/UnpackedTarball_firebird.mk4
-rwxr-xr-xexternal/firebird/Wincompatible-function-pointer-types.patch11
-rw-r--r--external/firebird/c++20.patch61
-rw-r--r--external/firebird/c++26.patch11
-rw-r--r--external/firebird/configure-c99.patch45
-rw-r--r--external/firebird/firebird-cygwin-msvc.patch6
-rw-r--r--external/firebird/macos-arm64.patch.08
8 files changed, 147 insertions, 20 deletions
diff --git a/external/firebird/ExternalProject_firebird.mk b/external/firebird/ExternalProject_firebird.mk
index 4843043da3f7..18ee97eb4409 100644
--- a/external/firebird/ExternalProject_firebird.mk
+++ b/external/firebird/ExternalProject_firebird.mk
@@ -44,6 +44,13 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
) \
$(if $(filter GCC-INTEL,$(COM)-$(CPUNAME)),-Di386=1) \
" \
+ && export CFLAGS=" \
+ $(if $(filter MSC,$(COM)),$(if $(MSVC_USE_DEBUG_RUNTIME),-DMSVC_USE_DEBUG_RUNTIME)) \
+ $(if $(filter MSC-TRUE-X86_64,$(COM)-$(COM_IS_CLANG)-$(CPUNAME)),-march=x86-64-v2) \
+ $(if $(HAVE_GCC_FNO_SIZED_DEALLOCATION),-fno-sized-deallocation -fno-delete-null-pointer-checks) \
+ $(call gb_ExternalProject_get_build_flags,firebird) \
+ $(if $(ENABLE_DEBUG),$(if $(filter MSC,$(COM)),-Od -Z7)) \
+ " \
&& export CXXFLAGS=" \
$(BOOST_CXXFLAGS) \
$(if $(filter MSC,$(COM)),$(if $(MSVC_USE_DEBUG_RUNTIME),-DMSVC_USE_DEBUG_RUNTIME)) \
@@ -51,10 +58,11 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
$(if $(HAVE_GCC_FNO_SIZED_DEALLOCATION),-fno-sized-deallocation -fno-delete-null-pointer-checks) \
$(CXXFLAGS_CXX11) \
$(if $(filter TRUE,$(COM_IS_CLANG)), -Wno-c++11-narrowing) \
- $(if $(call gb_Module__symbols_enabled,firebird),$(gb_DEBUGINFO_FLAGS)) \
+ $(call gb_ExternalProject_get_build_flags,firebird) \
$(if $(ENABLE_DEBUG),$(if $(filter MSC,$(COM)),-Od -Z7)) \
" \
&& export LDFLAGS=" \
+ $(call gb_ExternalProject_get_link_flags,firebird) \
$(if $(SYSTEM_LIBATOMIC_OPS),$(LIBATOMIC_OPS_LIBS), \
-L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src \
) \
@@ -70,20 +78,15 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
&& MAKE=$(MAKE) $(gb_RUN_CONFIGURE) ./configure \
--without-editline \
--with-wire-compress=no \
- $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ $(gb_CONFIGURE_PLATFORMS) \
$(if $(DISABLE_DYNLOADING), \
--enable-static --disable-shared \
, \
--enable-shared --disable-static \
) \
- $(if $(filter MACOSX,$(OS)), \
- --build=$(subst macos,darwin,$(BUILD_PLATFORM)) --host=$(subst macos,darwin,$(HOST_PLATFORM)) \
- $(if $(filter 1, \
- $(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") \
+ $(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 cc84b5f139e7..821b167650d5 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -49,6 +49,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/msvc.patch \
external/firebird/wnt-per-process-trace-storage.patch.1 \
external/firebird/0001-extern-cloop-Missing-dependencies-of-compilations-on.patch.1 \
+ 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/Wincompatible-function-pointer-types.patch b/external/firebird/Wincompatible-function-pointer-types.patch
new file mode 100755
index 000000000000..d5482bdcf2c2
--- /dev/null
+++ b/external/firebird/Wincompatible-function-pointer-types.patch
@@ -0,0 +1,11 @@
+--- extern/cloop/src/tests/test1/CTest.c
++++ extern/cloop/src/tests/test1/CTest.c
+@@ -402,7 +402,7 @@
+ struct CALC_IFactory* (*createFactory)();
+
+ #ifdef WIN32
+- createFactory = (struct Factory* (*)()) GetProcAddress(library, "createFactory");
++ createFactory = (struct CALC_IFactory* (*)()) GetProcAddress(library, "createFactory");
+ #else
+ createFactory = dlsym(library, "createFactory");
+ #endif
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()
+ {
diff --git a/external/firebird/c++26.patch b/external/firebird/c++26.patch
new file mode 100644
index 000000000000..e3ffe61b4f03
--- /dev/null
+++ b/external/firebird/c++26.patch
@@ -0,0 +1,11 @@
+--- src/jrd/SimilarToMatcher.h
++++ src/jrd/SimilarToMatcher.h
+@@ -1455,7 +1455,7 @@
+ gds__log("%d, %s", state, debugText.c_str());
+ #endif
+
+-#define ENCODE_OP_STATE(op, state) ((op) | (state))
++#define ENCODE_OP_STATE(op, state) (+(op) | (state))
+
+ // Go directly to op and state with a single switch.
+
diff --git a/external/firebird/configure-c99.patch b/external/firebird/configure-c99.patch
new file mode 100644
index 000000000000..a62a63fb024e
--- /dev/null
+++ b/external/firebird/configure-c99.patch
@@ -0,0 +1,45 @@
+--- configure
++++ configure
+@@ -20518,8 +20518,9 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++#include <stdlib.h>
+ #include <semaphore.h>
+- main () {
++ int main () {
+ sem_t s;
+ exit(sem_init(&s,0,0));
+ }
+@@ -21263,8 +21264,9 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++#include <stdlib.h>
+ #include <unistd.h>
+- main () {
++ int main () {
+ exit(!(sizeof(off_t) == 8));
+ }
+ _ACEOF
+@@ -21478,8 +21480,9 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++#include <stdlib.h>
+ #include <semaphore.h>
+-main () {
++int main () {
+ struct s {
+ char a;
+ union { long long x; sem_t y; } b;
+@@ -21514,7 +21517,8 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-main () {
++#include <stdlib.h>
++int main () {
+ struct s {
+ char a;
+ double b;
diff --git a/external/firebird/firebird-cygwin-msvc.patch b/external/firebird/firebird-cygwin-msvc.patch
index 7f4332633316..c59c614ba5da 100644
--- a/external/firebird/firebird-cygwin-msvc.patch
+++ b/external/firebird/firebird-cygwin-msvc.patch
@@ -29,12 +29,12 @@
--- configure 2016-07-07 15:57:04.538983200 +0200
+++ configure 2016-07-13 11:31:18.132820200 +0200
-@@ -21473,13 +21473,12 @@
- else
+@@ -21490,13 +21490,12 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+ #include <stdlib.h>
-#include <semaphore.h>
- main () {
+ int main () {
struct s {
char a;
- union { long long x; sem_t y; } b;
diff --git a/external/firebird/macos-arm64.patch.0 b/external/firebird/macos-arm64.patch.0
index 12a845c57ce9..ab2596dbd987 100644
--- a/external/firebird/macos-arm64.patch.0
+++ b/external/firebird/macos-arm64.patch.0
@@ -24,14 +24,6 @@
i*86-*-darwin*)
MAKEFILE_PREFIX=darwin_i386
MAKEFILE_POSTFIX=darwin
-@@ -21344,6 +21344,7 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-+#include <stdlib.h>
- main () {
- struct s {
- char a;
--- src/common/common.h
+++ src/common/common.h
@@ -234,6 +234,12 @@