From dcdb389c16dec011f488f9eca95a6cc3661853a5 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Aug 03 2017 17:53:23 +0000 Subject: Added patch from OpenSuse to support s390x (bug #1453092) --- diff --git a/gasnet-s390-support.patch b/gasnet-s390-support.patch new file mode 100644 index 0000000..6254e42 --- /dev/null +++ b/gasnet-s390-support.patch @@ -0,0 +1,52 @@ +From: Nicolas Morey-Chaisemartin +Date: 2017-06-12 04:37:30 +Subject: s390/s390x support + +Ref: https://upc-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3523 + +diff --git gasnet_membar.h gasnet_membar.h +index f1376c4..1204183 100644 +--- gasnet_membar.h ++++ gasnet_membar.h +@@ -260,6 +260,12 @@ + #define gasneti_local_rmb() gasneti_local_mb() + #define GASNETI_RMB_IS_MB + #define GASNETI_WMB_IS_MB ++#elif PLATFORM_ARCH_S390 && PLATFORM_COMPILER_GNU ++ #define gasneti_local_mb() __sync_synchronize() ++ #define gasneti_local_wmb() gasneti_local_mb() ++ #define gasneti_local_rmb() gasneti_local_mb() ++ #define GASNETI_RMB_IS_MB ++ #define GASNETI_WMB_IS_MB + #else + #error unknown CPU - dont know how to do a local memory barrier for your CPU/OS + #endif +diff --git other/gasnet_portable_platform.h other/gasnet_portable_platform.h +index 917cb9b..4fe8776 100644 +--- other/gasnet_portable_platform.h ++++ other/gasnet_portable_platform.h +@@ -157,6 +157,7 @@ + #undef PLATFORM_ARCH_ARM + #undef PLATFORM_ARCH_AARCH64 + #undef PLATFORM_ARCH_TILE ++#undef PLATFORM_ARCH_S390 + #undef PLATFORM_ARCH_UNKNOWN + + /* prevent known old/broken versions of this header from loading */ +@@ -925,6 +926,16 @@ + #define _PLATFORM_ARCH_32 1 + #endif + ++#elif defined(__s390__) ++ #define PLATFORM_ARCH_S390 1 ++ #define PLATFORM_ARCH_FAMILYNAME S390 ++ #define _PLATFORM_ARCH_BIG_ENDIAN 1 ++ #if defined(__s390x__) ++ #define _PLATFORM_ARCH_64 1 ++ #else ++ #define _PLATFORM_ARCH_32 1 ++ #endif ++ + #else /* unknown CPU */ + #define PLATFORM_ARCH_UNKNOWN 1 + #define PLATFORM_ARCH_FAMILYNAME UNKNOWN diff --git a/gasnet.spec b/gasnet.spec index 9a48601..e9b68be 100644 --- a/gasnet.spec +++ b/gasnet.spec @@ -1,14 +1,12 @@ -# s390x isn't supported by upstream (bug #1453092) -# https://upc-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3523 -ExcludeArch: s390x - Name: gasnet Version: 1.28.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A Portable High-Performance Communication Layer for GAS Languages License: PostgreSQL Url: https://bitbucket.org/berkeleylab/gasnet/ Source0: https://bitbucket.org/berkeleylab/gasnet/downloads/GASNet-%{version}.tar.gz +#Patch from OpenSuse to support s390 - https://upc-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3523 +Patch0: gasnet-s390-support.patch BuildRequires: automake Requires: %{name}-common%{?_isa} = %{version}-%{release} @@ -86,6 +84,7 @@ Documentation package for GASNet. %prep %setup -q -n GASNet-%{version} +%patch0 -p0 %build mkdir serial openmpi mpich @@ -93,20 +92,20 @@ mkdir serial openmpi mpich pushd serial %dconfigure --enable-udp --disable-mpi --enable-par --disable-aligned-segments --enable-segment-fast --with-segment-mmap-max=4GB CC="gcc -fPIC" CXX="g++ -fPIC" -%make_build MANUAL_CFLAGS="%optflags -fPIC" MANUAL_MPICFLAGS="%optflags -fPIC" MANUAL_CXXFLAGS="%optflags -fPIC" +%make_build MANUAL_CFLAGS="%optflags -fPIC" MANUAL_MPICFLAGS="%optflags -fPIC" MANUAL_CXXFLAGS="%optflags -fPIC" -j3 popd pushd openmpi %{_openmpi_load} %dconfigure --enable-udp --enable-mpi --enable-par --disable-aligned-segments --enable-segment-fast --with-segment-mmap-max=4GB --bindir="${MPI_BIN}" --includedir="${MPI_INCLUDE}" --libdir="${MPI_LIB}" CC="gcc -fPIC" CXX="g++ -fPIC" -%make_build MANUAL_CFLAGS="%optflags -fPIC" MANUAL_MPICFLAGS="%optflags -fPIC" MANUAL_CXXFLAGS="%optflags -fPIC" +%make_build MANUAL_CFLAGS="%optflags -fPIC" MANUAL_MPICFLAGS="%optflags -fPIC" MANUAL_CXXFLAGS="%optflags -fPIC" -j3 %{_openmpi_unload} popd pushd mpich %{_mpich_load} %dconfigure --enable-udp --enable-mpi --enable-par --disable-aligned-segments --enable-segment-fast --with-segment-mmap-max=4GB --bindir="${MPI_BIN}" --includedir="${MPI_INCLUDE}" --libdir="${MPI_LIB}" CC="gcc -fPIC" CXX="g++ -fPIC" -%make_build MANUAL_CFLAGS="%optflags -fPIC" MANUAL_MPICFLAGS="%optflags -fPIC" MANUAL_CXXFLAGS="%optflags -fPIC" +%make_build MANUAL_CFLAGS="%optflags -fPIC" MANUAL_MPICFLAGS="%optflags -fPIC" MANUAL_CXXFLAGS="%optflags -fPIC" -j3 %{_mpich_unload} popd @@ -199,6 +198,10 @@ done %{_libdir}/mpich*/lib/valgrind %changelog +* Thu Aug 03 2017 Christoph Junghans - 1.28.2-7 +- Added patch from OpenSuse to support s390x (bug #1453092) +- limit to -j3 due to parallel make error + * Wed Aug 02 2017 Fedora Release Engineering - 1.28.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild