mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 09:13:08 +00:00
Makefile fix for sanitize
Small fixes for compilation with sanitize=yes optimize=no, by always adding -fsanitize=undefined to the LDFLAGS as required. Updates config-sanity to check&report the status of the flag. No functional change.
This commit is contained in:
parent
d4abf54247
commit
67d19447f4
1 changed files with 4 additions and 1 deletions
|
@ -265,6 +265,7 @@ endif
|
||||||
### 3.2.2 Debugging with undefined behavior sanitizers
|
### 3.2.2 Debugging with undefined behavior sanitizers
|
||||||
ifeq ($(sanitize),yes)
|
ifeq ($(sanitize),yes)
|
||||||
CXXFLAGS += -g3 -fsanitize=undefined
|
CXXFLAGS += -g3 -fsanitize=undefined
|
||||||
|
LDFLAGS += -fsanitize=undefined
|
||||||
endif
|
endif
|
||||||
|
|
||||||
### 3.3 Optimization
|
### 3.3 Optimization
|
||||||
|
@ -472,6 +473,7 @@ config-sanity:
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Config:"
|
@echo "Config:"
|
||||||
@echo "debug: '$(debug)'"
|
@echo "debug: '$(debug)'"
|
||||||
|
@echo "sanitize: '$(sanitize)'"
|
||||||
@echo "optimize: '$(optimize)'"
|
@echo "optimize: '$(optimize)'"
|
||||||
@echo "arch: '$(arch)'"
|
@echo "arch: '$(arch)'"
|
||||||
@echo "bits: '$(bits)'"
|
@echo "bits: '$(bits)'"
|
||||||
|
@ -490,6 +492,7 @@ config-sanity:
|
||||||
@echo "Testing config sanity. If this fails, try 'make help' ..."
|
@echo "Testing config sanity. If this fails, try 'make help' ..."
|
||||||
@echo ""
|
@echo ""
|
||||||
@test "$(debug)" = "yes" || test "$(debug)" = "no"
|
@test "$(debug)" = "yes" || test "$(debug)" = "no"
|
||||||
|
@test "$(sanitize)" = "yes" || test "$(sanitize)" = "no"
|
||||||
@test "$(optimize)" = "yes" || test "$(optimize)" = "no"
|
@test "$(optimize)" = "yes" || test "$(optimize)" = "no"
|
||||||
@test "$(arch)" = "any" || test "$(arch)" = "x86_64" || test "$(arch)" = "i386" || \
|
@test "$(arch)" = "any" || test "$(arch)" = "x86_64" || test "$(arch)" = "i386" || \
|
||||||
test "$(arch)" = "ppc64" || test "$(arch)" = "ppc" || test "$(arch)" = "armv7"
|
test "$(arch)" = "ppc64" || test "$(arch)" = "ppc" || test "$(arch)" = "armv7"
|
||||||
|
|
Loading…
Add table
Reference in a new issue