From 0b92f51d8303a5148aa99dc101d1e73244199a61 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 28 Jul 2015 18:56:18 -0700 Subject: Don't disable SSE in x86-64 ld.so Since ld.so preserves vector registers now, we can use SSE in ld.so. * sysdeps/i386/Makefile [$(subdir) == elf] (CFLAGS-.os): Add -mno-sse -mno-mmx for $(all-rtld-routines). [$(subdir) == elf] (tests-special): Add $(objpfx)tst-ld-sse-use.out. [$(subdir) == elf] ($(objpfx)tst-ld-sse-use.out): New rule. * sysdeps/x86/Makefile [$(subdir) == elf] (CFLAGS-.os): Removed. [$(subdir) == elf] (tests-special): Likewise. [$(subdir) == elf] ($(objpfx)tst-ld-sse-use.out): Likewise. * sysdeps/x86_64/Makefile [$(subdir) == elf] (CFLAGS-.os): Add -mno-mmx for $(all-rtld-routines). --- sysdeps/i386/Makefile | 11 +++++++++++ sysdeps/x86/Makefile | 11 ----------- sysdeps/x86_64/Makefile | 3 +++ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile index 9f12190e32..53e8ab92f7 100644 --- a/sysdeps/i386/Makefile +++ b/sysdeps/i386/Makefile @@ -81,3 +81,14 @@ endif ifeq ($(subdir),csu) gen-as-const-headers += tlsdesc.sym endif + +ifeq ($(subdir),elf) +CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\ + -mno-sse -mno-mmx) + +tests-special += $(objpfx)tst-ld-sse-use.out +$(objpfx)tst-ld-sse-use.out: ../sysdeps/x86/tst-ld-sse-use.sh $(objpfx)ld.so + @echo "Checking ld.so for SSE register use. This will take a few seconds..." + $(BASH) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@; \ + $(evaluate-test) +endif diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile index 74d2b17f8f..0fabdaecc3 100644 --- a/sysdeps/x86/Makefile +++ b/sysdeps/x86/Makefile @@ -1,14 +1,3 @@ -ifeq ($(subdir),elf) -CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\ - -mno-sse -mno-mmx) - -tests-special += $(objpfx)tst-ld-sse-use.out -$(objpfx)tst-ld-sse-use.out: ../sysdeps/x86/tst-ld-sse-use.sh $(objpfx)ld.so - @echo "Checking ld.so for SSE register use. This will take a few seconds..." - $(BASH) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@; \ - $(evaluate-test) -endif - ifeq ($(subdir),csu) gen-as-const-headers += cpu-features-offsets.sym rtld-global-offsets.sym endif diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index 5cf79e6c49..859e6a976a 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -19,6 +19,9 @@ gen-as-const-headers += locale-defines.sym endif ifeq ($(subdir),elf) +CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\ + -mno-mmx) + sysdep-dl-routines += tlsdesc dl-tlsdesc sysdep_routines += tlsdesc dl-tlsdesc sysdep-rtld-routines += tlsdesc dl-tlsdesc -- cgit 1.4.1