This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] i386: disable sse in rtld-divdi3.os
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: libc-alpha at sourceware dot org
- Cc: "H . J . Lu" <hjl dot tools at gmail dot com>, Aurelien Jarno <aurelien at aurel32 dot net>
- Date: Thu, 14 Jul 2016 12:45:24 +0200
- Subject: [PATCH] i386: disable sse in rtld-divdi3.os
- Authentication-results: sourceware.org; auth=none
When compiling the GNU libc on i386 using GCC 6 and for a CPU with SSE
support (e.g. -march=pentium4, -march=core2, -march=haswell, ...) the
rtld-divdi3.os file ends up with SSE instructions using the XMM
registers. This makes the elf/tst-ld-sse-use test to fail:
function __udivdi3 in rtld-divdi3.os modifies xmm/ymm/zmm
Modify sysdeps/i386/Makefile to compile this file with -mno-sse -mno-mmx
-mfpmath=387 like it is already done for other files used by ld.so.
Changelog:
* sysdeps/i386/Makefile [$(subdir) == csu] (CFLAGS-rtld-divdi3.os):
New. Set to -mno-sse -mno-mmx -mfpmath=387.
---
ChangeLog | 5 +++++
sysdeps/i386/Makefile | 3 +++
2 files changed, 8 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 234a3cc..efb5ef4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-07-14 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/i386/Makefile [$(subdir) == csu] (CFLAGS-rtld-divdi3.os):
+ New. Set to -mno-sse -mno-mmx -mfpmath=387.
+
2016-07-13 Samuel Thibault <samuel.thibault@ens-lyon.org>
* bits/termios.h (TABDLY): Change macro to include TAB3 bit too.
diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
index 6c91842..33e74df 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -98,3 +98,6 @@ $(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so
$(BASH) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@; \
$(evaluate-test)
endif
+ifeq ($(subdir),csu)
+CFLAGS-rtld-divdi3.os += -mno-sse -mno-mmx -mfpmath=387
+endif
--
2.8.1