How to set x86 ISA needed property?

Manuel Lauss manuel.lauss@gmail.com
Wed Jan 27 16:06:50 GMT 2021


Servus Florian,


On Wed, Jan 27, 2021 at 4:26 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Manuel Lauss via Libc-help:
>
> > I've been building a userland for an AMD E-450 (gcc march=btver1) on
> > a much more modern and faster x86 host.
> > Now, the machione does not boot because up-to-date  glibc devel says this:
> >
> > /lib64/libc.so.6: CPU ISA level is lower than required
> >
> > readelf libc.so.6 says:
> > Displaying notes found in: .note.gnu.property
> >  Owner                Data size        Description
> >  GNU                  0x00000010       NT_GNU_PROPERTY_TYPE_0
> >      Properties: x86 ISA needed: x86-64-baseline, x86-64-v2, x86-64-v3
> >
> > x86-64-v3 is supported by the build machine, but the btver1 is at most -v2.
> > This used to work in the past; is there a way to force glibc to a certain level?
> > (binutils-2.35.1, gcc-10.2.1, glibc master as of 27.01.2021).
>
> What does “gcc -v”?  What are you glibc configure/build flags?

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/tmp-ram/portage/sys-devel/gcc-10.2.0-r5/work/gcc-10.2.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/10.2.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/python
--enable-languages=c,c++ --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --disable-nls
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 10.2.0-r5 p6' --disable-esp
--enable-libstdcxx-time --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-multilib
--with-multilib-list=m32,m64 --disable-fixed-point
--enable-targets=all --enable-libgomp --disable-libssp
--disable-libada --disable-systemtap --disable-vtable-verify
--disable-libvtv --with-zstd --enable-lto --with-isl
--disable-isl-version-check --disable-libsanitizer
--disable-default-pie --disable-default-ssp --with-arch=btver1
--with-tune=btver1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Gentoo 10.2.0-r5 p6)



This is the gentoo ebuild's configure invocation:

configure --enable-stack-protector=no
--enable-stackguard-randomization --disable-cet --enable-kernel=3.2.0
--without-selinux --without-cvs --disable-werror --enable-bind-now
--build=x8
6_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --disable-profile
--without-gd --with-headers=/usr/include --prefix=/usr
--sysconfdir=/etc --localstatedir=/var --libdir=$(prefix)/lib64
--mandir=$(prefix)/share/man --infodir=$(prefix)/share/info
--libexecdir=$(libdir)/misc/glibc
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion=Gentoo
2.32-r7 p6 --enable-crypt --disable-static-pie --disable-systemtap
--disable-nscd libc_cv_complocaledir=${exec_prefix}/lib/locale
--disable-ti
mezone-tools

> This is expected to happen only if you use something like
> -march=x86-64-v3 to build glibc, and only with recent toolchain
> version.  I'm surprised you are hitting this with GCC 10, which does not
> implement -march=x86-64-v3.

I'm surprised as well, though not all libs/executables have the property set,
most are missing it.  Gentoo's patches to gcc don't add the property code
either, i'll check binutils next.

I removed the note, and this allowed systemd to start.

Danke!
     Manuel


More information about the Libc-help mailing list