aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/config/bootstrap-ubsan.mk
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/config/bootstrap-ubsan.mk')
-rw-r--r--gcc-4.9/config/bootstrap-ubsan.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc-4.9/config/bootstrap-ubsan.mk b/gcc-4.9/config/bootstrap-ubsan.mk
new file mode 100644
index 000000000..d2615e8f8
--- /dev/null
+++ b/gcc-4.9/config/bootstrap-ubsan.mk
@@ -0,0 +1,8 @@
+# This option enables -fsanitize=undefined for stage2 and stage3.
+
+STAGE2_CFLAGS += -fsanitize=undefined
+STAGE3_CFLAGS += -fsanitize=undefined
+POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan \
+ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ \
+ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/ \
+ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/.libs