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