From: Khem Raj <raj.khem@gmail.com>
To: libc-alpha@sourceware.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH V3] When disabling SSE, make sure -fpmath is not set to use SSE either
Date: Thu, 31 Mar 2016 15:45:00 -0000 [thread overview]
Message-ID: <1459439112-30153-1-git-send-email-raj.khem@gmail.com> (raw)
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
ChangeLog | 6 ++++++
sysdeps/i386/Makefile | 6 +++++-
2 files changed, 11 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..929b377 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -88,8 +88,12 @@ 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, this
+# avoids below compiler diagnostic
+# warning: SSE instruction set disabled, using 387 arithmetics
+# which is treated as error with -Werror
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.7.4
next reply other threads:[~2016-03-31 15:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 15:45 Khem Raj [this message]
2016-04-03 2:16 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1459439112-30153-1-git-send-email-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).