@@ -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.
@@ -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
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(-)