From: Nathan Moinvaziri Date: Thu, 17 Mar 2022 19:57:41 +0000 (-0700) Subject: Wrong variable used when detecting unaligned support for sanitize X-Git-Tag: 2.1.0-beta1~322 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b5cfb67ee6ac6f25363274b5c82110810058172;p=thirdparty%2Fzlib-ng.git Wrong variable used when detecting unaligned support for sanitize --- diff --git a/cmake/detect-sanitizer.cmake b/cmake/detect-sanitizer.cmake index fc4519ef..965ddca8 100644 --- a/cmake/detect-sanitizer.cmake +++ b/cmake/detect-sanitizer.cmake @@ -112,7 +112,7 @@ macro(add_undefined_sanitizer) ) # Only check for alignment sanitizer flag if unaligned access is not supported - if(NOT UNALIGNED_OK) + if(NOT WITH_UNALIGNED) list(APPEND known_checks alignment) endif() # Object size sanitizer has no effect at -O0 and produces compiler warning if enabled @@ -129,7 +129,7 @@ macro(add_undefined_sanitizer) # Group sanitizer flag -fsanitize=undefined will automatically add alignment, even if # it is not in our sanitize flag list, so we need to explicitly disable alignment sanitizing. - if(UNALIGNED_OK) + if(WITH_UNALIGNED) add_compile_options(-fno-sanitize=alignment) endif() else()