glibc/eglibc-mandriva-i586-if-no-cmov.patch
Andrey Bondrov c532d8d676 New version 2.24
Re-diff some patches
Drop no longer needed patches
2016-09-01 14:57:23 +10:00

25 lines
995 B
Diff

--- glibc-2.24/sysdeps/i386/dl-machine.h.0072~ 2016-08-02 04:01:36.000000000 +0200
+++ glibc-2.24/sysdeps/i386/dl-machine.h 2016-08-17 16:58:27.711996583 +0200
@@ -226,6 +226,9 @@ _dl_start_user:\n\
Prelinked libraries may use Elf32_Rela though. */
#define ELF_MACHINE_PLT_REL 1
+/* We need the definition of HWCAP_I386_CMOV. */
+#include <sysdeps/i386/dl-hwcapinfo.h>
+
/* We define an initialization functions. This is called very early in
_dl_sysdep_start. */
#define DL_PLATFORM_INIT dl_platform_init ()
@@ -241,6 +244,12 @@ dl_platform_init (void)
/* init_cpu_features has been called early from __libc_start_main in
static executable. */
init_cpu_features (&GLRO(dl_x86_cpu_features));
+
+ if (GLRO(dl_platform) != NULL
+ && GLRO(dl_platform)[1] >= '6' && (GLRO(dl_hwcap) & HWCAP_I386_CMOV) == 0)
+ /* Avoid i686 compiled libraries to be loaded if the host doesn't
+ support CMOV instructions. */
+ GLRO(dl_platform) = "i586";
#endif
}