aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorMatt Whitlock <sourceware@mattwhitlock.name>2021-06-16 23:40:47 -0400
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-08-19 09:11:35 -0300
commit0835c0f0bad351117154b815f34f8af19ea7e325 (patch)
treec2e718b643a87a75bf0720ea1b6602297bf697ea /elf
parentbca0f5cbc9257c13322b99e55235c4f21ba0bd82 (diff)
downloadglibc-0835c0f0bad351117154b815f34f8af19ea7e325.zip
glibc-0835c0f0bad351117154b815f34f8af19ea7e325.tar.gz
glibc-0835c0f0bad351117154b815f34f8af19ea7e325.tar.bz2
x86: fix Autoconf caching of instruction support checks [BZ #27991]
The Autoconf documentation for the AC_CACHE_CHECK macro states: The commands-to-set-it must have no side effects except for setting the variable cache-id, see below. However, the tests for support of -msahf and -mmovbe were embedded in the commands-to-set-it for lib_cv_include_x86_isa_level. This had the consequence that libc_cv_have_x86_lahf_sahf and libc_cv_have_x86_movbe were not defined whenever lib_cv_include_x86_isa_level was read from cache. These variables' being undefined meant that their unquoted use in later test expressions led to the 'test' built-in's misparsing its arguments and emitting errors like "test: =: unexpected operator" or "test: =: unary operator expected", depending on the particular shell. This commit refactors the tests for LAHF/SAHF and MOVBE instruction support into their own AC_CACHE_CHECK macro invocations to obey the rule that the commands-to-set-it must have no side effects other than setting the variable named by cache-id. Signed-off-by: Matt Whitlock <sourceware@mattwhitlock.name> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf')
0 files changed, 0 insertions, 0 deletions