This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 5/7] New local GCC patch for CAN_SANITIZE_UB ifdef.
- From: marxin <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Oct 2018 13:35:32 +0200
- Subject: [PATCH 5/7] New local GCC patch for CAN_SANITIZE_UB ifdef.
- References: <cover.1540462546.git.mliska@suse.cz>
- Resent-user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0
libsanitizer/ChangeLog:
2018-10-24 Martin Liska <mliska@suse.cz>
* ubsan/ubsan_platform.h: Add ifndef as we define it with
-DCAN_SANITIZE_UB CFLAGS.
---
libsanitizer/ubsan/ubsan_platform.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libsanitizer/ubsan/ubsan_platform.h b/libsanitizer/ubsan/ubsan_platform.h
index 75d06646ce8..67c4e079724 100644
--- a/libsanitizer/ubsan/ubsan_platform.h
+++ b/libsanitizer/ubsan/ubsan_platform.h
@@ -11,6 +11,7 @@
#ifndef UBSAN_PLATFORM_H
#define UBSAN_PLATFORM_H
+#ifndef CAN_SANITIZE_UB
// Other platforms should be easy to add, and probably work as-is.
#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
defined(__NetBSD__) || defined(__OpenBSD__) || \
@@ -20,5 +21,6 @@
#else
# define CAN_SANITIZE_UB 0
#endif
+#endif //CAN_SANITIZE_UB
#endif