Accepting request 733943 from home:Andreas_Schwab:Factory

- Enable build on riscv64
- Add memory constraints for riscv64, restrict to 2 jobs
- allow-riscv-and-riscv64-CPU.patch: recognize riscv64 as architecture
- Apply Disable-unboxed-arrays.patch also on s390x

OBS-URL: https://build.opensuse.org/request/show/733943
OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=304
This commit is contained in:
Peter Trommler 2019-09-30 14:24:09 +00:00 committed by Git OBS Bridge
parent 9ff53fd9c0
commit 4ecac94ad1
4 changed files with 56 additions and 4 deletions

View File

@ -7,4 +7,14 @@
<size unit="G">4</size> <size unit="G">4</size>
</physicalmemory> </physicalmemory>
</hardware> </hardware>
<overwrite>
<conditions>
<arch>riscv64</arch>
</conditions>
<hardware>
<physicalmemory>
<size unit="G">20</size>
</physicalmemory>
</hardware>
</overwrite>
</constraints> </constraints>

View File

@ -0,0 +1,31 @@
Description: cherry-pick of upstream commits
beba89a0f16681c85d39fc8a894bde4162ff492a.patch:
5e63a25249f3cb07300258e115af9ff55079d2ea.patch:
Last-Update: 2019-05-27
Index: ghc-8.6.5/aclocal.m4
===================================================================
--- ghc-8.6.5.orig/aclocal.m4
+++ ghc-8.6.5/aclocal.m4
@@ -217,7 +217,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_V
mipsel)
test -z "[$]2" || eval "[$]2=ArchMipsel"
;;
- hppa|hppa1_1|ia64|m68k|nios2|rs6000|s390|s390x|sh4|vax)
+ hppa|hppa1_1|ia64|m68k|nios2|riscv32|riscv64|rs6000|s390|s390x|sh4|vax)
test -z "[$]2" || eval "[$]2=ArchUnknown"
;;
*)
@@ -1906,6 +1906,12 @@ case "$1" in
powerpc*)
$2="powerpc"
;;
+ riscv64*)
+ $2="riscv64"
+ ;;
+ riscv|riscv32*)
+ $2="riscv32"
+ ;;
rs6000)
$2="rs6000"
;;

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Sep 23 09:28:37 UTC 2019 - Andreas Schwab <schwab@suse.de>
- Enable build on riscv64
- Add memory constraints for riscv64, restrict to 2 jobs
- allow-riscv-and-riscv64-CPU.patch: recognize riscv64 as architecture
- Apply Disable-unboxed-arrays.patch also on s390x
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Apr 25 22:11:40 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com> Thu Apr 25 22:11:40 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@ -26,7 +26,7 @@
%define with_libnuma 0 %define with_libnuma 0
%endif %endif
%global unregisterised_archs s390 s390x %global unregisterised_archs s390 s390x riscv64
Name: ghc Name: ghc
Version: 8.6.5 Version: 8.6.5
@ -35,7 +35,7 @@ Url: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.ta
Summary: The Glorious Glasgow Haskell Compiler Summary: The Glorious Glasgow Haskell Compiler
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Languages/Other Group: Development/Languages/Other
ExclusiveArch: aarch64 %{arm} %{ix86} x86_64 ppc64 ppc64le s390x ExclusiveArch: aarch64 %{arm} %{ix86} x86_64 ppc64 ppc64le s390x riscv64
# hard to port to PIE, some prebuilt static libraries are non-PIC ... # hard to port to PIE, some prebuilt static libraries are non-PIC ...
#!BuildIgnore: gcc-PIE #!BuildIgnore: gcc-PIE
BuildRequires: binutils-devel BuildRequires: binutils-devel
@ -93,6 +93,8 @@ Patch1: 0001-Fix-check-whether-GCC-supports-__atomic_-builtins.patch
Patch2: D5212.patch Patch2: D5212.patch
# PATCH-FIX-UPSTREAM Disable-unboxed-arrays.patch ptrommler@icloud.com -- Do not use unboxed arrays on big-endian platforms. See Haskell Trac #15411. # PATCH-FIX-UPSTREAM Disable-unboxed-arrays.patch ptrommler@icloud.com -- Do not use unboxed arrays on big-endian platforms. See Haskell Trac #15411.
Patch3: Disable-unboxed-arrays.patch Patch3: Disable-unboxed-arrays.patch
# PATCH-FIX-UPSTREAM allow-riscv-and-riscv64-CPU.patch slyfox@gentoo.org -- aclocal.m4: allow riscv and riscv64 CPU
Patch4: allow-riscv-and-riscv64-CPU.patch
# PATCH-FIX-UPSTREAM ghc-pie.patch - set linux as default PIE platform # PATCH-FIX-UPSTREAM ghc-pie.patch - set linux as default PIE platform
Patch35: ghc-pie.patch Patch35: ghc-pie.patch
# PATCH-FIX-OPENSUSE ghc-8.0.2-Cabal-dynlibdir.patch -- Fix shared library directory location. # PATCH-FIX-OPENSUSE ghc-8.0.2-Cabal-dynlibdir.patch -- Fix shared library directory location.
@ -204,9 +206,10 @@ except the ghc library, which is installed by the toplevel ghc metapackage.
%setup -q %setup -q
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%ifarch ppc64 %ifarch ppc64 s390 s390x
%patch3 -p1 %patch3 -p1
%endif %endif
%patch4 -p1
%patch35 -p1 %patch35 -p1
%patch100 -p1 %patch100 -p1
%patch110 -p1 %patch110 -p1
@ -264,7 +267,7 @@ export CFLAGS="${CFLAGS:-%optflags}"
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \ --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
--with-system-libffi --with-system-libffi
%ifnarch s390 s390x %ifnarch s390 s390x riscv64
%if 0%{?suse_version} >= 1500 %if 0%{?suse_version} >= 1500
%limit_build -m 2000 %limit_build -m 2000
make %{?_smp_mflags} make %{?_smp_mflags}