File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,14 @@ if test "$DEFAULT_PAGESIZE" != auto; then
2020fi
2121
2222AC_ARG_WITH ( [ asan] ,
23- AS_HELP_STRING ( [ --with-asan] , [ Link with libasan ] )
23+ AS_HELP_STRING ( [ --with-asan] , [ Build with address sanitizer ] )
2424)
2525AM_CONDITIONAL([ WITH_ASAN] , [ test x"$with_asan" = xyes] )
2626
27+ AC_ARG_WITH ( [ ubsan] ,
28+ AS_HELP_STRING ( [ --with-ubsan] , [ Build with undefined behavior sanitizer] )
29+ )
30+ AM_CONDITIONAL([ WITH_UBSAN] , [ test x"$with_ubsan" = xyes] )
31+
2732AC_CONFIG_FILES ( [ Makefile src/Makefile tests/Makefile patchelf.spec] )
2833AC_OUTPUT
Original file line number Diff line number Diff line change 11AM_CXXFLAGS = -Wall -std=c++11 -D_FILE_OFFSET_BITS=64
22
3+ SAN_FLAGS = -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1
4+
35if WITH_ASAN
4- AM_CXXFLAGS += -fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1
6+ AM_CXXFLAGS += -fsanitize=address $(SAN_FLAGS )
7+ endif
8+
9+ if WITH_UBSAN
10+ AM_CXXFLAGS += -fsanitize=undefined $(SAN_FLAGS )
511endif
612
713bin_PROGRAMS = patchelf
You can’t perform that action at this time.
0 commit comments