public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] When disabling SSE,  make sure -fpmath is not set to use SSE either
@ 2016-01-06  2:37 Khem Raj
  2016-01-06 17:05 ` Joseph Myers
  2016-04-03  4:55 ` [PATCH V4] " Khem Raj
  0 siblings, 2 replies; 4+ messages in thread
From: Khem Raj @ 2016-01-06  2:37 UTC (permalink / raw)
  To: libc-alpha; +Cc: Khem Raj

This fixes errors when we inject sse options through CFLAGS and now
that we have -Werror turned on by default this warning turns to become
error on x86

gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S
-mno-sse -mno-mmx

generates warning
/dev/null:1:0: warning: SSE instruction set disabled, using 387
arithmetics

where as

gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S
-mno-sse -mno-mmx -mfpmath=387

Generates no warnings

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ChangeLog             | 5 +++++
 sysdeps/i386/Makefile | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 2ad1b5a..bbb7199 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-05  Khem Raj  <raj.khem@gmail.com>
+
+	* sysdeps/i386/Makefile [$(subdir) == elf] (CFLAGS-.os):
+	Add -mfpmath=387.
+
 2016-01-05  Joseph Myers  <joseph@codesourcery.com>
 
 	* manual/texinfo.tex: Update to version 2016-01-04.21 with
diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
index 168512f..70153b3 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -89,7 +89,7 @@ ifeq ($(subdir),elf)
 # the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
 # which must be preserved.
 CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-		   -mno-sse -mno-mmx)
+		   -mno-sse -mno-mmx -mfpmath=387)
 
 tests-special += $(objpfx)tst-ld-sse-use.out
 $(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so
-- 
2.6.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] When disabling SSE,  make sure -fpmath is not set to use SSE either
  2016-01-06  2:37 [PATCH] When disabling SSE, make sure -fpmath is not set to use SSE either Khem Raj
@ 2016-01-06 17:05 ` Joseph Myers
  2016-04-03  4:55 ` [PATCH V4] " Khem Raj
  1 sibling, 0 replies; 4+ messages in thread
From: Joseph Myers @ 2016-01-06 17:05 UTC (permalink / raw)
  To: Khem Raj; +Cc: libc-alpha

If this fixes bug 17950, you need to include

	[BZ #17950]

in your ChangeLog entry, mention the bug number in your commit message and 
close that bug as fixed with the milestone set appropriately once the fix 
is in.

(This is not a review or approval of the patch.)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH V4] When disabling SSE, make sure -fpmath is not set to use SSE either
@ 2016-04-03  4:55 ` Khem Raj
  2016-04-10  2:16   ` Mike Frysinger
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2016-04-03  4:55 UTC (permalink / raw)
  To: libc-alpha; +Cc: vapier, Khem Raj

This fixes errors when we inject sse options through CFLAGS and now
that we have -Werror turned on by default this warning turns to become
error on x86

gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S
-mno-sse -mno-mmx

generates warning
/dev/null:1:0: warning: SSE instruction set disabled, using 387
arithmetics

where as

gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S
-mno-sse -mno-mmx -mfpmath=387

Generates no warnings

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Changes since v1:
- Add BZ enry to ChangeLog and commit message

Changes since v2:
- Add commentary in makefile, describing why the change is needed

Changes since v3:
- Make commentary in makefile to be precise

 ChangeLog             | 6 ++++++
 sysdeps/i386/Makefile | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 4fc73b1..6d2fd80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-31  Khem Raj  <raj.khem@gmail.com>
+
+	[BZ #17950]
+	* sysdeps/i386/Makefile [$(subdir) == elf] (CFLAGS-.os):
+	Add -mfpmath=387.
+
 2016-03-31  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
 	* elf/tst-dlsym-error.c: Include <string.h> for strchrnul.
diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
index 168512f..6c91842 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -88,8 +88,9 @@ ifeq ($(subdir),elf)
 # Make sure no code in ld.so uses mm/xmm/ymm/zmm registers on i386 since
 # the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
 # which must be preserved.
+# With SSE disabled, ensure -fpmath is not set to use sse either.
 CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-		   -mno-sse -mno-mmx)
+		   -mno-sse -mno-mmx -mfpmath=387)
 
 tests-special += $(objpfx)tst-ld-sse-use.out
 $(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so
-- 
2.8.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V4] When disabling SSE, make sure -fpmath is not set to use SSE either
  2016-04-03  4:55 ` [PATCH V4] " Khem Raj
@ 2016-04-10  2:16   ` Mike Frysinger
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2016-04-10  2:16 UTC (permalink / raw)
  To: Khem Raj; +Cc: libc-alpha

[-- Attachment #1: Type: text/plain, Size: 36 bytes --]

i've pushed this now, thanks!
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-10  2:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-06  2:37 [PATCH] When disabling SSE, make sure -fpmath is not set to use SSE either Khem Raj
2016-01-06 17:05 ` Joseph Myers
2016-04-03  4:55 ` [PATCH V4] " Khem Raj
2016-04-10  2:16   ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).