DivestOS/Patches/LineageOS-20.0/android_build/0001-Enable_fwrapv.patch
Tad 055ed9bfad
20.0: Initial bringup
Signed-off-by: Tad <tad@spotco.us>
2022-10-15 10:39:48 -04:00

25 lines
772 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Tue, 13 Sep 2016 22:05:56 -0400
Subject: [PATCH] use -fwrapv when signed overflow checking is off
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
---
core/config_sanitizers.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk
index a0ff11951..0a73b70f5 100644
--- a/core/config_sanitizers.mk
+++ b/core/config_sanitizers.mk
@@ -505,3 +505,9 @@ ifneq ($(findstring fsanitize,$(my_cflags)),)
endif
endif
endif
+
+ifeq ($(filter signed-integer-overflow integer undefined,$(my_sanitize)),)
+ ifeq ($(filter -ftrapv,$(my_cflags)),)
+ my_cflags += -fwrapv
+ endif
+endif