From 9fc3f49bd63fd3521e47ba3f09fb42d372a88e02 Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Feb 08 2014 11:51:30 +0000 Subject: Backport fix for floating point issues on i686. --- diff --git a/ruby-2.2.0-configure.in-use-SSE2.patch b/ruby-2.2.0-configure.in-use-SSE2.patch new file mode 100644 index 0000000..87858ce --- /dev/null +++ b/ruby-2.2.0-configure.in-use-SSE2.patch @@ -0,0 +1,49 @@ +From 40967a5c0b975f3f3ec1538a820985aa61b65b8f Mon Sep 17 00:00:00 2001 +From: nobu +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 ++ ++ * 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 + + * 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 + diff --git a/ruby.spec b/ruby.spec index 645265f..6a4e404 100644 --- a/ruby.spec +++ b/ruby.spec @@ -149,6 +149,9 @@ Patch19: ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch Patch20: rubygems-2.2.1-Add-BasicSpecification-source_paths.patch # https://github.com/rubygems/rubygems/commit/2f03b54b63043aadce9e95b83e98b29712bad21f Patch21: rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch +# TestSprintf#test_float fails on i686 +# http://bugs.ruby-lang.org/issues/8358 +Patch22: ruby-2.2.0-configure.in-use-SSE2.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -416,6 +419,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -581,13 +585,6 @@ DISABLE_TESTS="" DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" %endif -%ifarch i686 -# TestSprintf#test_float fails on i686 -# http://bugs.ruby-lang.org/issues/8358 -sed -i "/assert_equal(\"0x1p+2\", sprintf('%.0a', Float('0x1.fp+1')), \"\[ruby-dev:42551\]\")/ s/^/#/" test/ruby/test_sprintf.rb -sed -i "/assert_equal(\"-0x1.0p+2\", sprintf('%.1a', Float('-0x1.ffp+1')), \"\[ruby-dev:42551\]\")/ s/^/#/" test/ruby/test_sprintf.rb -%endif - # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). @@ -907,6 +904,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" extensions into appropriate place. - Add support for ppc64le arch (rhbz#1053263). - Re-enable some test cases, which are passing now with Kernel 3.12.8+. +- Backport fix for floating point issues on i686. * Thu Jan 02 2014 Vít Ondruch - 2.1.0-17 - Upgrade to Ruby 2.1.0.