The current test uses AX_CHECK_LINK_FLAG
which is buggy in multiple ways:
- It prints its own “checking” line, which interrupts the main one.
- The
AX_CHECK_LINK_FLAG
macro is used incorrectly, with a null flag to check. We’re actually testing if the linker accepts the code, which is whatAC_LINK_IFELSE
is for. - It attempts to use/create a cache based on the provided flags, which in this case are blank and
$SANITIZER_LDFLAGS
. - The generated code for the cache variable is
printf "%s\n" "ax_cv_check_ldflags_$SANITIZER_LDFLAGS_"
which will access the wrong variable,SANITIZER_LDFLAGS_
, typically undefined, and therefore use a generic cache variable of merelyax_cv_check_ldflags_
I don’t see any real practical harm in this, but it might be a good idea to fix it, especially since any repetition of this pattern would cause the cache to get used incorrectly.