diff --git a/glibc-rh1945473.patch b/glibc-rh1945473.patch new file mode 100644 index 0000000..df5e45a --- /dev/null +++ b/glibc-rh1945473.patch @@ -0,0 +1,28 @@ +Add diagnostics for missing z14 support. Not yet upstream. Discussion +is here: + + s390x: Diagnose missing VXE at run time if required at build time + + +The approach implemented by upstream will likely be slightly different +(if upstream takes the patch at all). dl_platform_init does not work +for POWER because POWER9 instructions are used in __tunables_init, +which is called before DL_PLATFORM_INIT/dl_platform_init. + +diff --git a/sysdeps/s390/s390-64/dl-machine.h b/sysdeps/s390/s390-64/dl-machine.h +index 543361c83637c071..deaf37951206fb7c 100644 +--- a/sysdeps/s390/s390-64/dl-machine.h ++++ b/sysdeps/s390/s390-64/dl-machine.h +@@ -235,6 +235,12 @@ _dl_start_user:\n\ + static inline void __attribute__ ((unused)) + dl_platform_init (void) + { ++#ifdef __LONG_DOUBLE_VX__ ++ if (!(GLRO(dl_hwcap) & HWCAP_S390_VXE)) ++ _dl_fatal_printf ("\ ++Fatal glibc error: CPU lacks VXE support (z14 or later required)\n"); ++#endif ++ + if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') + /* Avoid an empty string which would disturb us. */ + GLRO(dl_platform) = NULL; diff --git a/glibc.spec b/glibc.spec index 30059e8..464db26 100644 --- a/glibc.spec +++ b/glibc.spec @@ -89,7 +89,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 7%{?dist} +Release: 8%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -167,6 +167,7 @@ Patch47: glibc-upstream-2.33-16.patch Patch48: glibc-upstream-2.33-17.patch Patch49: glibc-upstream-2.33-18.patch Patch50: glibc-upstream-2.33-19.patch +Patch51: glibc-rh1945473.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2288,6 +2289,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Fri Apr 9 2021 Florian Weimer - 2.33-8 +- s390x: Implement preliminary check for z14 support (#1945473) + * Fri Apr 9 2021 Florian Weimer - 2.33-7 - Inherit additional build flags from redhat-rpm-config (#1947895)