Accepting request 201119 from devel:languages:haskell:platform
Fix autoconf issues. Fix ppc64 build. OBS-URL: https://build.opensuse.org/request/show/201119 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=142
This commit is contained in:
parent
be3205a195
commit
a31c5d4bbd
26
0001-Delete-spurious-comma-in-configure.ac.patch
Normal file
26
0001-Delete-spurious-comma-in-configure.ac.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 8cf720ec511d22edb5f545b5b9847358533000d2 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Trommler <ptrommler@acm.org>
|
||||
Date: Tue, 24 Sep 2013 16:19:40 +0200
|
||||
Subject: [PATCH] Delete spurious comma in configure.ac
|
||||
|
||||
A comma in AC_CHECK_FUNCS prevented setitimer from being detected.
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c0b2a14..5f0731d 100644
|
||||
--- a/libraries/process/configure.ac
|
||||
+++ b/libraries/process/configure.ac
|
||||
@@ -16,7 +16,7 @@ AC_FUNC_FORK
|
||||
# check for specific header (.h) files that we are interested in
|
||||
AC_CHECK_HEADERS([signal.h sys/wait.h fcntl.h])
|
||||
|
||||
-AC_CHECK_FUNCS([setitimer, sysconf])
|
||||
+AC_CHECK_FUNCS([setitimer sysconf])
|
||||
|
||||
FP_CHECK_CONSTS([SIG_DFL SIG_IGN])
|
||||
|
||||
--
|
||||
1.7.10.4
|
||||
|
30
0001-Fix-detection-of-library-for-shm-on-openSUSE.patch
Normal file
30
0001-Fix-detection-of-library-for-shm-on-openSUSE.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 235aedba6b68feecb3ec4c84dbf6a1d1e3e1965a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Trommler <ptrommler@acm.org>
|
||||
Date: Tue, 24 Sep 2013 13:44:54 +0200
|
||||
Subject: [PATCH] Fix detection of library for shm* on openSUSE.
|
||||
|
||||
Use the new AC_SERACH_LIBS to check if rt is needed for shm_open
|
||||
and shm_unlink. This sets LIBS and so the shm_* functions
|
||||
can be found if librt is indeed required. Passing -lrt through
|
||||
CFLAGS is not portable.
|
||||
---
|
||||
configure.ac | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: ghc-7.6.3/libraries/unix/configure.ac
|
||||
===================================================================
|
||||
--- ghc-7.6.3.orig/libraries/unix/configure.ac
|
||||
+++ ghc-7.6.3/libraries/unix/configure.ac
|
||||
@@ -54,10 +54,9 @@ AC_CHECK_MEMBERS([struct stat.st_uctime]
|
||||
AC_CHECK_FUNCS([mkstemps mkdtemp])
|
||||
|
||||
# Avoid adding rt if absent or unneeded
|
||||
-AC_CHECK_LIB(rt, shm_open, [EXTRA_LIBS="$EXTRA_LIBS rt" CFLAGS="$CFLAGS -lrt"])
|
||||
-
|
||||
# needs -lrt on linux
|
||||
-AC_CHECK_FUNCS([shm_open shm_unlink])
|
||||
+AC_SEARCH_LIBS(shm_open, rt, [AC_CHECK_FUNCS([shm_open shm_unlink])])
|
||||
+AS_IF([test "x$ac_cv_search_shm_open" = x-lrt], [EXTRA_LIBS="$EXTRA_LIBS rt"])
|
||||
|
||||
FP_CHECK_CONSTS([SIGABRT SIGALRM SIGBUS SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 SIGPOLL SIGPROF SIGSYS SIGTRAP SIGURG SIGVTALRM SIGXCPU SIGXFSZ SIG_BLOCK SIG_SETMASK SIG_UNBLOCK], [
|
||||
#if HAVE_SIGNAL_H
|
24
ghc.changes
24
ghc.changes
@ -1,3 +1,27 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 24 20:56:45 UTC 2013 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- Add 0001-Fix-detection-of-library-for-shm-on-openSUSE.patch:
|
||||
Fix broken autoconf test for shm_* and librt. Haskell trac #8350
|
||||
- Add 0001-Delete-spurious-comma-in-configure.ac.patch:
|
||||
Fix test for setitimer. Haskell trac #8352
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 24 07:02:11 UTC 2013 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- set up build.mk with configuration for ppc64
|
||||
* explicitly disable features that are not supported on ppc64
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 23 17:32:52 UTC 2013 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- add BR binutils-devel for bfd.h and libiberty
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 23 14:27:19 UTC 2013 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- add BR libelf-devel for nlist.h
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 10 16:21:19 UTC 2013 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
|
43
ghc.spec
43
ghc.spec
@ -16,6 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
%global unregisterised_archs ppc64 s390 s390s
|
||||
|
||||
%ifarch %{unregisterised_archs}
|
||||
%global ghc_without_shared 1
|
||||
%endif
|
||||
|
||||
Name: ghc
|
||||
Version: 7.6.3
|
||||
Release: 0
|
||||
@ -23,7 +29,7 @@ Url: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.ta
|
||||
Summary: The Glorious Glasgow Haskell Compiler
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Other
|
||||
ExclusiveArch: %{ix86} x86_64 ppc
|
||||
ExclusiveArch: %{ix86} x86_64 ppc ppc64
|
||||
|
||||
BuildRequires: ghc-bytestring-devel
|
||||
BuildRequires: ghc-compiler >= 7.0
|
||||
@ -61,10 +67,12 @@ BuildRequires: ghc-unix
|
||||
%endif
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: gcc
|
||||
BuildRequires: ghc-rpm-macros-extra
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: libelf-devel
|
||||
BuildRequires: libffi-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkg-config
|
||||
@ -88,6 +96,10 @@ Patch2: Cabal-fix-dynamic-exec-for-TH.patch
|
||||
Patch3: ghc-7.6.3-LlvmCodeGen-no-3.3-warning.patch
|
||||
# PATCH-FIX-UPSTREAM ghc-avoid-empty-llvm-used-definitions.patch peter.trommler@ohm-hochschule.de - Backport of commit db9b63105a54, fixes Haskell trac #7996
|
||||
Patch4: ghc-avoid-empty-llvm-used-definitions.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-Fix-detection-of-library-for-shm-on-openSUSE.patch peter.trommler@ohm-hochschule.de - Fix test for librt and shm_* detection. Backported patch sent upstream 2013-09-24, Haskell trac #8350.
|
||||
Patch5: 0001-Fix-detection-of-library-for-shm-on-openSUSE.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-Delete-spurious-comma-in-configure.ac.patch peter.trommler@ohm-hochschule.de - Fix test for setitimer. Backported patch sent upstream 2013-09-24, Haskell trac #8352
|
||||
Patch6: 0001-Delete-spurious-comma-in-configure.ac.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@ -186,10 +198,15 @@ rm -r ghc-tarballs/libffi
|
||||
%patch2 -p1 -b .TH
|
||||
%patch3 -p1 -b .llvm-version
|
||||
%patch4 -p1 -b .llvm-empty
|
||||
%patch5 -p1 -b .shm
|
||||
%patch6 -p1 -b .comma
|
||||
|
||||
%build
|
||||
# required for patch and patch1
|
||||
autoreconf -fi
|
||||
#autoreconf -fi
|
||||
|
||||
# required for patch5 and patch6 and will run autoreconf for patch and patch1
|
||||
perl boot
|
||||
|
||||
# Check if bootstrap is required, i.e. version is different from ghc's version
|
||||
# Note: Cannot use ghc_version macro here as we defined version override earlier
|
||||
@ -197,6 +214,16 @@ autoreconf -fi
|
||||
%define ghc_boot 1
|
||||
cat > mk/build.mk <<EOF
|
||||
GhcLibWays = v
|
||||
%ifarch %{unregisterised_archs}
|
||||
GhcUnregisterised=YES
|
||||
%endif
|
||||
%ifarch ppc64
|
||||
GhcWithNativeCodeGen=NO
|
||||
SplitObjs=NO
|
||||
GhcRTSWays := debug
|
||||
GhcNotThreaded=YES
|
||||
GhcWithInterpreter=NO
|
||||
%endif
|
||||
HADDOCK_DOCS = NO
|
||||
BUILD_DOCBOOK_HTML = NO
|
||||
HSCOLOUR_SRCS = NO
|
||||
@ -211,8 +238,20 @@ make clean
|
||||
# http://hackage.haskell.org/trac/ghc/wiki/Platforms
|
||||
# cf https://github.com/gentoo-haskell/gentoo-haskell/tree/master/dev-lang/ghc
|
||||
cat > mk/build.mk << EOF
|
||||
%ifnarch %{unregisterised_archs}
|
||||
BuildFlavour = perf
|
||||
%endif
|
||||
GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p}
|
||||
%ifarch %{unregisterised_archs}
|
||||
GhcUnregisterised=YES
|
||||
%endif
|
||||
%ifarch ppc64
|
||||
GhcWithNativeCodeGen=NO
|
||||
SplitObjs=NO
|
||||
GhcRTSWays := debug
|
||||
GhcNotThreaded=YES
|
||||
GhcWithInterpreter=NO
|
||||
%endif
|
||||
%if %{defined without_haddock}
|
||||
HADDOCK_DOCS = NO
|
||||
%endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user