Closed AbheekG closed 8 years ago
ok ok I was thinking of adding some detection logic to the makefile to avoid santizers if compiler doesn't support, but address santizer should be supported in GCC 4.8, undefined behavior in 4.9.
Something like
cc_asan:=$(shell expr `gcc -dumpversion` \>= 4.8)
cc_ubsan:=$(shell expr `gcc -dumpversion` \>= 4.9)
ifeq $(cc_asan) 1
SANFLAGS += -fsanitize=address
endif
ifeq $(cc_ubsan) 1
SANFLAGS += -fsanitize=undefined
endif
@maedoc Please pull the amendment.
@abheekg add the float cast flag and I'll merge
Many GCC versions don't support these options. Examples,
gcc (Gentoo 4.9.3 p1.5, pie-0.6.4) 4.9.3
andgcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
. Either they can be removed in tests, or some instructions can be given on how to support them. Currently travis also works withSANFLAGS=
i.e., no sanflags.Faced the problem after switching from Ubuntu 15.10 to Gentoo.