summaryrefslogtreecommitdiff
path: root/external/firebird
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-06-03 17:02:31 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-06-03 22:52:02 +0200
commit731665f3c604fd3820500275445876bbc77b9c08 (patch)
treed645bc70f431b17709fcaff9116089a4074acc77 /external/firebird
parent1ec232b1479c751547b766769285284eef6bb2e3 (diff)
firebird: adapt asan.patch to GCC, which lacks __has_feature
Also apply sanitizer.patch, because why not. Also tweak configure to check for dlsym() instead of dlopen(); the situation described in commit 037584cfe5e58bf6807fb0188d245042baa8c1c0 still holds on Fedora 27. Change-Id: I446fa3e991aec06452f135ab8365702a397c441a Reviewed-on: https://gerrit.libreoffice.org/55247 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'external/firebird')
-rw-r--r--external/firebird/UnpackedTarball_firebird.mk2
-rw-r--r--external/firebird/asan.patch21
2 files changed, 20 insertions, 3 deletions
diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk
index aaea3a5b4231..96f29a76ead5 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -48,12 +48,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
))
endif
-ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,firebird, \
external/firebird/sanitizer.patch \
))
endif
-endif
# vim: set noet sw=4 ts=4:
diff --git a/external/firebird/asan.patch b/external/firebird/asan.patch
index b6ecec8f4caf..a4ef7075a884 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,8 +38,17 @@
+@@ -38,8 +38,20 @@
#include "gen/autoconfig.h"
#endif
@@ -216,6 +216,9 @@
+#if defined __clang__ && (defined __apple_build_version__ ? __clang_major__ >= 9 : __clang_major__ >= 4)
+#define USE_ASAN
+#endif
++#if defined __SANITIZE_ADDRESS__
++#define USE_ASAN
++#endif
+
// Using our debugging code is pointless when we may use Valgrind features
-#if defined(DEV_BUILD) && !defined(USE_VALGRIND)
@@ -234,3 +237,19 @@
T* end;
};
#endif // RECURSIVE_SIMILAR
+--- configure.orig 2018-06-03 17:44:50.152951348 +0200
++++ configure 2018-06-03 17:45:11.708907807 +0200
+@@ -18479,11 +18479,11 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char dlopen ();
++char dlsym ();
+ int
+ main ()
+ {
+-return dlopen ();
++return dlsym ();
+ ;
+ return 0;
+ }