From patchwork Thu Jul 14 10:45:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 13791 Received: (qmail 61425 invoked by alias); 14 Jul 2016 10:45:47 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 60828 invoked by uid 89); 14 Jul 2016 10:45:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*r:121, Samuel, samuel, sk:cflags X-HELO: hall.aurel32.net From: Aurelien Jarno To: libc-alpha@sourceware.org Cc: "H . J . Lu" , Aurelien Jarno Subject: [PATCH] i386: disable sse in rtld-divdi3.os Date: Thu, 14 Jul 2016 12:45:24 +0200 Message-Id: <1468493124-20655-1-git-send-email-aurelien@aurel32.net> 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 + + * sysdeps/i386/Makefile [$(subdir) == csu] (CFLAGS-rtld-divdi3.os): + New. Set to -mno-sse -mno-mmx -mfpmath=387. + 2016-07-13 Samuel Thibault * 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