summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/firebird/ExternalProject_firebird.mk2
-rw-r--r--external/firebird/asan.patch13
2 files changed, 6 insertions, 9 deletions
diff --git a/external/firebird/ExternalProject_firebird.mk b/external/firebird/ExternalProject_firebird.mk
index 5ca8c0b01418..d370df0d83ae 100644
--- a/external/firebird/ExternalProject_firebird.mk
+++ b/external/firebird/ExternalProject_firebird.mk
@@ -58,8 +58,6 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
" \
&& export CXXFLAGS=" \
$(if $(filter MSC,$(COM)),$(if $(MSVC_USE_DEBUG_RUNTIME),-DMSVC_USE_DEBUG_RUNTIME)) \
- $(if $(filter LINUX/X86_64/TRUE,$(OS)/$(CPUNAME)/$(COM_IS_CLANG)), \
- -DDEBUG_GDS_ALLOC) \
$(if $(HAVE_GCC_FNO_SIZED_DEALLOCATION),-fno-sized-deallocation -fno-delete-null-pointer-checks) \
$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS), \
$(BOOST_CPPFLAGS) \
diff --git a/external/firebird/asan.patch b/external/firebird/asan.patch
index 4c40f52bfc87..b6ecec8f4caf 100644
--- a/external/firebird/asan.patch
+++ b/external/firebird/asan.patch
@@ -204,7 +204,7 @@
#ifdef DEBUG_GDS_ALLOC
--- src/include/firebird.h
+++ src/include/firebird.h
-@@ -38,10 +38,19 @@
+@@ -38,8 +38,17 @@
#include "gen/autoconfig.h"
#endif
@@ -213,17 +213,16 @@
+#define USE_ASAN
+#endif
+#endif
++#if defined __clang__ && (defined __apple_build_version__ ? __clang_major__ >= 9 : __clang_major__ >= 4)
++#define USE_ASAN
++#endif
+
// Using our debugging code is pointless when we may use Valgrind features
- #if defined(DEV_BUILD) && !defined(USE_VALGRIND)
+-#if defined(DEV_BUILD) && !defined(USE_VALGRIND)
++#if defined(DEV_BUILD) && !(defined(USE_VALGRIND) || defined(USE_ASAN))
#define DEBUG_GDS_ALLOC
#endif
-+#if defined USE_ASAN
-+#undef DEBUG_GDS_ALLOC
-+#endif
- #if defined(WIN_NT)
- #define FB_DLL_EXPORT __declspec(dllexport)
--- src/jrd/SimilarToMatcher.h
+++ src/jrd/SimilarToMatcher.h
@@ -338,7 +338,7 @@