Bug 27991 - x86: sysdeps/x86/configure.ac breaks when libc_cv_include_x86_isa_level is loaded from cache
Summary: x86: sysdeps/x86/configure.ac breaks when libc_cv_include_x86_isa_level is lo...
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: build (show other bugs)
Version: 2.33
: P2 minor
Target Milestone: 2.35
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-17 03:31 UTC by Matt Whitlock
Modified: 2021-08-19 12:15 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
patch (1.79 KB, patch)
2021-06-17 03:32 UTC, Matt Whitlock
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Whitlock 2021-06-17 03:31:28 UTC
This bug is a follow-on to Bug 27318 Comment 10.

sysdeps/x86/configure.ac incorrectly makes one call to AC_CACHE_CHECK to set three variables: libc_cv_include_x86_isa_level, libc_cv_have_x86_lahf_sahf, and libc_cv_have_x86_movbe. This has the consequence that the latter two variables do not get set whenever the first variable's value is loaded from cache. Then, the later tests using those variables fail because the test arguments are unquoted and the variables are unset.

Attached is a patch that refactors the checks for LAHF/SAHF and MOVBE instruction support into separate AC_CACHE_CHECK calls so that the variables are defined even when libc_cv_include_x86_isa_level is cached.

I will also submit the patch to the libc-alpha@sourceware.org list.
Comment 1 Matt Whitlock 2021-06-17 03:32:39 UTC
Created attachment 13498 [details]
patch
Comment 2 Adhemerval Zanella 2021-08-19 12:15:29 UTC
Fixed on 2.35.