Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From 97fe7f1b23ea1f17533884b8fa7f7eb40087d558 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 5 Jan 2016 17:50:00 -0800 |
| 4 | Subject: [PATCH] When disabling SSE, make sure -fpmath is not set to use SSE |
| 5 | either |
| 6 | |
| 7 | This fixes errors when we inject sse options through CFLAGS and now |
| 8 | that we have -Werror turned on by default this warning turns to become |
| 9 | error on x86 |
| 10 | |
| 11 | gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S |
| 12 | -mno-sse -mno-mmx |
| 13 | |
| 14 | generates warning |
| 15 | /dev/null:1:0: warning: SSE instruction set disabled, using 387 |
| 16 | arithmetics |
| 17 | |
| 18 | where as |
| 19 | |
| 20 | gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S |
| 21 | -mno-sse -mno-mmx -mfpmath=387 |
| 22 | |
| 23 | Generates no warnings |
| 24 | |
| 25 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 26 | --- |
| 27 | Upstream-Status: Submitted |
| 28 | |
| 29 | ChangeLog | 5 +++++ |
| 30 | sysdeps/i386/Makefile | 2 +- |
| 31 | 2 files changed, 6 insertions(+), 1 deletion(-) |
| 32 | |
| 33 | diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile |
| 34 | index 168512f..70153b3 100644 |
| 35 | --- a/sysdeps/i386/Makefile |
| 36 | +++ b/sysdeps/i386/Makefile |
| 37 | @@ -89,7 +89,7 @@ ifeq ($(subdir),elf) |
| 38 | # the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters |
| 39 | # which must be preserved. |
| 40 | CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\ |
| 41 | - -mno-sse -mno-mmx) |
| 42 | + -mno-sse -mno-mmx -mfpmath=387) |
| 43 | |
| 44 | tests-special += $(objpfx)tst-ld-sse-use.out |
| 45 | $(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so |
| 46 | -- |
| 47 | 2.6.4 |
| 48 | |