aboutsummaryrefslogtreecommitdiffstats
path: root/config.mk
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-05-15 01:22:19 +0200
committerMattias Andrée <m@maandree.se>2026-05-15 01:22:19 +0200
commit68d6804a43dca2749a68a557e67b98e6005ead83 (patch)
tree9c4137a48cd37ea423578d1ac3df6e3953cb2156 /config.mk
parentFix minor errors in the test and check that we are not writing out of bounds (diff)
downloadlibrecrypt-68d6804a43dca2749a68a557e67b98e6005ead83.tar.gz
librecrypt-68d6804a43dca2749a68a557e67b98e6005ead83.tar.bz2
librecrypt-68d6804a43dca2749a68a557e67b98e6005ead83.tar.xz
Fix some minor issues
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/config.mk b/config.mk
index 36994f3..e0359ba 100644
--- a/config.mk
+++ b/config.mk
@@ -3,9 +3,15 @@ MANPREFIX = $(PREFIX)/share/man
CC = c99
+COMMON_SANITIZE = -fsanitize=alignment,shift,signed-integer-overflow,object-size,null,undefined,bounds,address
+CLANG_SANITIZE = -O1 $(COMMON_SANITIZE),cfi -flto -fvisibility=hidden -fno-sanitize-trap=cfi
+GCC_SANITIZE = -O1 $(COMMON_SANITIZE)
+#SANITIZE = $(CLANG_SANITIZE)
+#SANITIZE = $(GCC_SANITIZE)
+
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
-CFLAGS =
-LDFLAGS =
+CFLAGS = $(SANITIZE)
+LDFLAGS = $(SANITIZE)
G = -g