public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] x86: Ensure MINIMUM_X86_ISA_LEVEL=0 for baseline [BZ #31867]
@ 2024-06-09 13:39 A. Wilcox
  2024-06-09 21:18 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: A. Wilcox @ 2024-06-09 13:39 UTC (permalink / raw)
  To: libc-alpha; +Cc: A. Wilcox

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86: Ensure MINIMUM_X86_ISA_LEVEL=0 for baseline [BZ #31867]
  2024-06-09 13:39 [PATCH] x86: Ensure MINIMUM_X86_ISA_LEVEL=0 for baseline [BZ #31867] A. Wilcox
@ 2024-06-09 21:18 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2024-06-09 21:18 UTC (permalink / raw)
  To: A. Wilcox; +Cc: GNU C Library

[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]

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
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-09 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-09 13:39 [PATCH] x86: Ensure MINIMUM_X86_ISA_LEVEL=0 for baseline [BZ #31867] A. Wilcox
2024-06-09 21:18 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).