aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-09-22 10:04:25 +0200
committerregnat <rg@regnat.ovh>2020-09-22 10:04:25 +0200
commit97b5154750d911a05992b97d7404d813d924de73 (patch)
tree7a8e0b4fdbbdad52e787c81f1c06607ec18c8f1c
parentecc8672aa007af045d77434b495ca09541e9fee3 (diff)
Disable `FORTIFY_SOURCE` when compiling without optims
Otherwise the build is cluttered with ``` /nix/store/fwpn2f7a4iqszyydw7ag61zlnp6xk5d3-glibc-2.30-dev/include/features.h:382:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] 382 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ ``` when building with `OPTIMIZE=0`
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f472ca7e5..c50d2c40f 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ OPTIMIZE = 1
ifeq ($(OPTIMIZE), 1)
GLOBAL_CXXFLAGS += -O3
else
- GLOBAL_CXXFLAGS += -O0
+ GLOBAL_CXXFLAGS += -O0 -U_FORTIFY_SOURCE
endif
include mk/lib.mk