On Wed, Feb 3, 2021 at 6:14 AM Joseph Myers wrote: > > On Tue, 2 Feb 2021, H.J. Lu wrote: > > > On Tue, Feb 2, 2021 at 3:11 PM Joseph Myers wrote: > > > > > > On Tue, 2 Feb 2021, H.J. Lu via Libc-alpha wrote: > > > > > > > Instead, we should require full ISA support for x86-64 level marker to > > > > detect such case: > > > > > > > > In file included from ../sysdeps/x86/abi-note.c:28: > > > > ../sysdeps/x86/isa-level.c:62:5: error: #error "Invalid ISAs for x86-64 ISA level v3" > > > > 62 | # error "Invalid ISAs for x86-64 ISA level v3" > > > > | ^~~~~ > > > > > > When does this error occur (what conditions for compilation / > > > configuration of glibc)? > > > > It happens at compile time when glibc is built with "-march=sandybridge". > > That's bad. Since glibc supports execution on Sandy Bridge processors, > compilation with -march=sandybridge should (a) work, with no special > configure options needed and (b) produce a glibc that works on Sandy > Bridge, with no special configure options needed. I understand that bug > 27318 is reporting that (b) fails at present. We need to fix (b) without > breaking (a). > > This is not specific at all to x86_64. It applies to all architectures > and processors supported by glibc: compiling with a compiler that defaults > to any such processor should just work, regardless of how that processor > relates to particular ISA levels in the glibc-hwcaps machinery. > > > We can add a configure option, --disable-isa-level, to unset > > INCLUDE_X86_ISA_LEVEL. The resulting libc.so doesn't have a marker > > and won't run on all machines. > > No special configure option should be needed for (a) and (b) to hold. > They are general principles for any processor supported by glibc, for any > architecture. Here is the updated patch to disable x86-64 level marker for -march=sandybridge which enables ISAs between v2 and v3. -- H.J.