Skip to content

Commit

Permalink
Makefile S=1 for compiler sanitation checks
Browse files Browse the repository at this point in the history
Signed-off-by: Fredrik Noring <noring@nocrew.org>
  • Loading branch information
frno7 committed Jul 13, 2019
1 parent e2783fb commit 13732bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# SPDX-License-Identifier: GPL-2.0
#
# Define V=1 for more verbose compile.
# Define S=1 for sanitation checks.

CFLAGS += -Wall -Iinclude

TOOL_CFLAGS += -O2 -g $(CFLAGS) $(BASIC_CFLAGS)

ifeq "$(S)" "1"
TOOL_CFLAGS += -fsanitize=address -fsanitize=leak -fsanitize=undefined \
-fsanitize-address-use-after-scope -fstack-check
endif

MODULE_LD := script/iop.ld
# FIXME: -O0 -> -O2
IOP_CFLAGS += -O0 -march=r3000 -EL -msoft-float -fomit-frame-pointer \
Expand Down

0 comments on commit 13732bf

Please sign in to comment.