heidistein / rpms / ruby

Forked from rpms/ruby 5 years ago
Clone
Blob Blame History Raw
From 40967a5c0b975f3f3ec1538a820985aa61b65b8f Mon Sep 17 00:00:00 2001
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Thu, 9 Jan 2014 11:46:26 +0000
Subject: [PATCH] configure.in: use SSE2

* configure.in: use SSE2 instructions to drop unexpected precisions on
  other than mingw.  [ruby-core:59472] [Bug #8358]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 ChangeLog    | 5 +++++
 configure.in | 8 ++++++++-
 2 files changed, 13 insertions(+), 0 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 7ec6eec..9ba337f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jan  9 20:46:22 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>
+
+	* configure.in: use SSE2 instructions to drop unexpected precisions on
+	  other than mingw.  [ruby-core:59472] [Bug #8358]
+
 Fri Jan  3 10:43:57 2014  Aman Gupta <ruby@tmm1.net>
 
 	* test/net/imap/cacert.pem: generate new CA cert, since the last one
diff --git a/configure.in b/configure.in
index f9e9431..9c95cc4 100644
--- a/configure.in
+++ b/configure.in
@@ -858,6 +857,14 @@ if test "$GCC" = yes; then
     for oflag in -fno-fast-math; do
 	RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)])
     done
+    AS_CASE(["$target"],
+	[*-darwin*], [
+	    # doesn't seem necessary on Mac OS X
+	],
+	[[i[4-6]86*]], [
+	    RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse)])
+	]
+    )
 fi
 
 AC_ARG_WITH(opt-dir,
-- 
1.8.5.1