[PATCH] x86: Ensure MINIMUM_X86_ISA_LEVEL=0 for baseline [BZ #31867]

H.J. Lu hjl.tools@gmail.com
Sun Jun 9 21:18:28 GMT 2024


This is wrong for x86-64.

On Sun, Jun 9, 2024, 9:40 PM A. Wilcox <AWilcox@wilcox-tech.com> wrote:

> The value of MINIMUM_X86_ISA_LEVEL starts at 0 for true baseline x86
> processors; 1 includes SSE and SSE2.  Before this change, building glibc
> for a target without SSE/SSE2 (such as a Pentium 3 or an Athlon XP)
> would result in the following error:
>
> /usr/lib/libc.so.6: CPU ISA level is lower than required
>
> Fixes: 46c9997413 ("x86: Define MINIMUM_X86_ISA_LEVEL in config.h [BZ
> #31676]")
> Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
> ---
>  sysdeps/x86/configure    | 2 +-
>  sysdeps/x86/configure.ac | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
> index d28d9bcb29..7cf243efb1 100644
> --- a/sysdeps/x86/configure
> +++ b/sysdeps/x86/configure
> @@ -152,7 +152,7 @@ else
>    libc_cv_have_x86_isa_level=baseline
>  fi
>  if test $libc_cv_have_x86_isa_level = baseline; then
> -  printf "%s\n" "#define MINIMUM_X86_ISA_LEVEL 1" >>confdefs.h
> +  printf "%s\n" "#define MINIMUM_X86_ISA_LEVEL 0" >>confdefs.h
>
>  else
>    printf "%s\n" "#define MINIMUM_X86_ISA_LEVEL
> $libc_cv_have_x86_isa_level" >>confdefs.h
> diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
> index 5b0acd03d2..2b1070cd98 100644
> --- a/sysdeps/x86/configure.ac
> +++ b/sysdeps/x86/configure.ac
> @@ -106,7 +106,7 @@ else
>    libc_cv_have_x86_isa_level=baseline
>  fi
>  if test $libc_cv_have_x86_isa_level = baseline; then
> -  AC_DEFINE_UNQUOTED(MINIMUM_X86_ISA_LEVEL, 1)
> +  AC_DEFINE_UNQUOTED(MINIMUM_X86_ISA_LEVEL, 0)
>  else
>    AC_DEFINE_UNQUOTED(MINIMUM_X86_ISA_LEVEL, $libc_cv_have_x86_isa_level)
>  fi
> --
> 2.40.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20240610/463d4252/attachment.htm>


More information about the Libc-alpha mailing list