From 5d56d1a5b4d52702eb4e4ea6f05e4b6eebf41ca8 Mon Sep 17 00:00:00 2001 From: Aleksa Vuckovic Date: Fri, 25 Nov 2022 23:44:40 +0100 Subject: UBSAN - FINALLY FIXING UNDEFINED BEHAVIOUR --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index dbce783..1eb51c9 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ LD = $(ARCH)ld OBJDUMP = $(ARCH)objcopy OBJCOPY = $(ARCH)objdump -W := -Wall -Werror -Wextra -pedantic -Wshadow -Wpointer-arith -Wcast-align -W += -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations +W := -Wall -Werror -Wextra -Wshadow -Wpointer-arith -Wcast-align +W += -Wwrite-strings W += -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wconversion W += -Wstrict-prototypes WNO := -Wno-error=unused-parameter -Wno-error=unused-variable @@ -19,6 +19,7 @@ CFLAGS += -mgeneral-regs-only # disables SIMD instructions CFLAGS += -MD -O3 -ffreestanding -nostdlib CFLAGS += -fno-common -fno-stack-protector CFLAGS += -fno-pie -no-pie -fno-pic +CFLAGS += -g -fsanitize=undefined LDFLAGS = -z max-page-size=4096 MAKE:=$(MAKE) -s -- cgit v1.2.3