New local GCC patch for CAN_SANITIZE_UB ifdef.
authorMartin Liska <mliska@suse.cz>
Wed, 31 Oct 2018 11:17:10 +0000 (12:17 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 31 Oct 2018 11:17:10 +0000 (11:17 +0000)
2018-10-31  Martin Liska  <mliska@suse.cz>

* ubsan/ubsan_platform.h: Add ifndef as we define it with
-DCAN_SANITIZE_UB CFLAGS.

From-SVN: r265669

libsanitizer/ChangeLog
libsanitizer/ubsan/ubsan_platform.h

index 4a933020bbd4a1909b4c2d8332667bbf049e3faf..37fe4689725435bd6e83cf0f5a87fe434b9c9fa7 100644 (file)
@@ -1,3 +1,8 @@
+2018-10-31  Martin Liska  <mliska@suse.cz>
+
+       * ubsan/ubsan_platform.h: Add ifndef as we define it with
+       -DCAN_SANITIZE_UB CFLAGS.
+
 2018-10-31  Martin Liska  <mliska@suse.cz>
 
        * asan/asan_mapping.h: Revert shadow memory offset to 1 << 41.
index 75d06646ce893c9b4fafee714c96cd6c42847a8e..67c4e07972479d5ee256faac3c2a101270fe3327 100644 (file)
@@ -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