blob: 2b889a94cf7194d7e29e75ae61235fa0c447dca5 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 97fe7f1b23ea1f17533884b8fa7f7eb40087d558 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 5 Jan 2016 17:50:00 -0800
4Subject: [PATCH] When disabling SSE, make sure -fpmath is not set to use SSE
5 either
6
7This fixes errors when we inject sse options through CFLAGS and now
8that we have -Werror turned on by default this warning turns to become
9error on x86
10
11gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S
12-mno-sse -mno-mmx
13
14generates warning
15/dev/null:1:0: warning: SSE instruction set disabled, using 387
16arithmetics
17
18where as
19
20gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S
21-mno-sse -mno-mmx -mfpmath=387
22
23Generates no warnings
24
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26---
27Upstream-Status: Submitted
28
29 ChangeLog | 5 +++++
30 sysdeps/i386/Makefile | 2 +-
31 2 files changed, 6 insertions(+), 1 deletion(-)
32
33diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
34index 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--
472.6.4
48