From 7e84d37e421d1923176a688c1175e83fd807aab3 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: May 02 2011 12:28:09 +0000 Subject: Proper fix for the atomic detection om ppc - no bug in gcc after all --- diff --git a/xrootd-rhel5-no-atomic.patch b/xrootd-rhel5-no-atomic.patch index 740dea3..7786e3a 100644 --- a/xrootd-rhel5-no-atomic.patch +++ b/xrootd-rhel5-no-atomic.patch @@ -1,32 +1,12 @@ diff -ur xrootd-3.0.3.orig/configure.ac xrootd-3.0.3/configure.ac --- xrootd-3.0.3.orig/configure.ac 2011-04-11 13:24:37.000000000 +0200 -+++ xrootd-3.0.3/configure.ac 2011-04-24 06:42:39.842593935 +0200 -@@ -248,25 +248,9 @@ - fi - - # Check for GCC's new atomic ops (as of 4.1.2) --AC_CACHE_CHECK([whether gcc provide atomic ops], [ac_atomic_ops], --[AC_TRY_RUN([ --int main() --{ ++++ xrootd-3.0.3/configure.ac 2011-05-02 13:50:01.879165899 +0200 +@@ -252,7 +252,7 @@ + [AC_TRY_RUN([ + int main() + { - unsigned long val = 111, tmp, *mem = &val; -- -- if (__sync_fetch_and_add(&val, 111) != 111 || val != 222) return 1; -- if (__sync_add_and_fetch(&val, 111) != 333) return 1; -- if (__sync_sub_and_fetch(&val, 111) != 222) return 1; -- if (__sync_fetch_and_sub(&val, 111) != 222 || val != 111) return 1; -- -- if (__sync_fetch_and_or (&val, 0) != 111 || val != 111) return 1; -- if (__sync_fetch_and_and(&val, 0) != 111 || val != 0 ) return 1; -- -- if (__sync_bool_compare_and_swap(mem, 0, 444) == 0 || val != 444) -- return 1; -- -- return 0; --}], ac_atomic_ops=yes, ac_atomic_ops=no, ac_atomic_ops=no)]) -+## Test disabled for RHEL5 ppc - using the detected atomic ops support -+## fails in compilation. RHBZ #699149 -+ac_atomic_ops=no ++ unsigned long long val = 111, tmp, *mem = &val; - if test "x$ac_atomic_ops" = "xyes"; then - AC_DEFINE(HAVE_ATOMICS) + if (__sync_fetch_and_add(&val, 111) != 111 || val != 222) return 1; + if (__sync_add_and_fetch(&val, 111) != 333) return 1; diff --git a/xrootd.spec b/xrootd.spec index db3ce63..4280655 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -5,7 +5,7 @@ Name: xrootd Epoch: 1 Version: 3.0.3 -Release: 1%{?dist}.1 +Release: 2%{?dist} Summary: Extended ROOT file server Group: System Environment/Daemons @@ -184,11 +184,7 @@ cp -p src/XrdFrmUtil/Makefile.am src/XrdFrm %patch10 -p1 %patch11 -p1 %patch12 -p1 -%if "%{?rhel}" == "5" -%ifarch ppc %patch13 -p1 -%endif -%endif # Turn off static linking find . -name Makefile.am -exec sed -e 's/ -static//g' -i {} ';' @@ -448,6 +444,9 @@ fi %doc %{_docdir}/%{name}-%{version} %changelog +* Mon May 02 2011 Mattias Ellert - 1:3.0.3-2 +- Proper fix for the atomic detection om ppc - no bug in gcc after all + * Sun Apr 24 2011 Mattias Ellert - 1:3.0.3-1.1 - Workaround for broken gcc on RHEL5 ppc (rhbz #699149)