Skip to content
Snippets Groups Projects
Commit 6be51c0f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add FORTIFY and SANITIZE options for DEBUG builds

SANITIZE is not fully supported (or recommended) yet.

FORTIFY will include some performance hits, but those might be offset by -O1
(which is apparently required for _FORTIFY_SOURCE to have any effect).
Prevviosly, DEBUG builds used (implicit -O0).
I'm building and running sbbs on Vertrauen (git.synchro.net) now with FORTIFY.

Set FORTIFY=1 in your localdefs.mk if you wish to have this build option
enabled persistently.
parent 0177b913
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4438 failed
......@@ -153,6 +153,13 @@ ifdef DEBUG
CFLAGS += -fprofile-arcs -ftest-coverage
LDFLAGS += -fprofile-arcs -ftest-coverage
endif
ifdef FORTIFY
CFLAGS += -D_FORTIFY_SOURCE=3 -O1
endif
ifdef SANITIZE
CFLAGS += -fsanitize=undefined,address
LDFLAGS += -fsanitize=undefined,address
endif
else
ifdef USE_UPROFILE
CFLAGS += -fprofile-use
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment