Kaydet (Commit) 731665f3 authored tarafından Michael Stahl's avatar Michael Stahl

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
037584cf still holds on Fedora 27.

Change-Id: I446fa3e991aec06452f135ab8365702a397c441a
Reviewed-on: https://gerrit.libreoffice.org/55247Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 1ec232b1
......@@ -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:
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment