Browse Source

Update the disabled ghc package

android-5
Fredrik Fornwall 8 years ago
parent
commit
9211b55379
  1. 41
      disabled-packages/ghc/build.sh
  2. 15
      disabled-packages/ghc/compiler-main-DriverPipeline.hs.patch
  3. 2
      disabled-packages/ghc/configure.patch

41
disabled-packages/ghc/build.sh

@ -2,11 +2,6 @@
# https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux
# and
# https://github.com/neurocyte/ghc-android
#
# Status: Currently fails at "error: cannot find -lpthread"
# right after message about building bin/hpc.
# As libpthread does not exist on Android (pthread
# is built into libc, this needs to be patched away.
TERMUX_PKG_HOMEPAGE=https://www.haskell.org/ghc/
TERMUX_PKG_DESCRIPTION="The Glasgow Haskell Compilation system"
TERMUX_PKG_VERSION=8.0.1
@ -18,26 +13,28 @@ TERMUX_PKG_DEPENDS="clang, ncurses"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-iconv-includes=$TERMUX_PREFIX/include -with-iconv-libraries=$TERMUX_PREFIX/lib"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-curses-includes=$TERMUX_PREFIX/include/ncursesw -with-curses-libraries=$TERMUX_PREFIX/lib"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --host=${TERMUX_HOST_PLATFORM}"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --target=${TERMUX_HOST_PLATFORM}"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --host=x86_64-unknown-linux --build=x86_64-unknown-linux"
ORIG_CFLAGS="$CFLAGS"
ORIG_CPPFLAGS="$CPPFLAGS"
ORIG_LDFLAGS="$LDFLAGS"
termux_step_post_extract_package() {
ORIG_CFLAGS="$CFLAGS"
ORIG_CPPFLAGS="$CPPFLAGS"
ORIG_LDFLAGS="$LDFLAGS"
unset AR
unset AS
unset CC
export CFLAGS=""
unset CPP
export CPPFLAGS=""
unset CXXFLAGS
unset CXX
export LDFLAGS=""
unset LD
unset PKG_CONFIG
unset RANLIB
unset AR
unset AS
unset CC
export CFLAGS=""
unset CPP
export CPPFLAGS=""
unset CXXFLAGS
unset CXX
export LDFLAGS=""
unset LD
unset PKG_CONFIG
unset RANLIB
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --target=${TERMUX_HOST_PLATFORM}"
}
termux_step_pre_configure () {
echo "INTEGER_LIBRARY = integer-simple" > mk/build.mk

15
disabled-packages/ghc/compiler-main-DriverPipeline.hs.patch

@ -0,0 +1,15 @@
diff -u -r ../ghc-8.0.1/compiler/main/DriverPipeline.hs ./compiler/main/DriverPipeline.hs
--- ../ghc-8.0.1/compiler/main/DriverPipeline.hs 2016-05-16 13:08:53.000000000 -0400
+++ ./compiler/main/DriverPipeline.hs 2016-09-07 03:37:48.321941122 -0400
@@ -1831,10 +1831,7 @@
| WayThreaded `elem` ways dflags =
let os = platformOS (targetPlatform dflags)
in if os == OSOsf3 then ["-lpthread", "-lexc"]
- else if os `elem` [OSMinGW32, OSFreeBSD, OSOpenBSD,
- OSNetBSD, OSHaiku, OSQNXNTO, OSiOS, OSDarwin]
- then []
- else ["-lpthread"]
+ else []
| otherwise = []
rc_objs <- maybeCreateManifest dflags output_fn

2
disabled-packages/ghc/configure.patch

@ -6,7 +6,7 @@ diff -u -r ../ghc-8.0.1/configure ./configure
# versions of LLVM simultaneously, but that stopped working around
# 3.5/3.6 release of LLVM.
-LlvmVersion=3.7
+LlvmVersion=3.8
+LlvmVersion=3.9
sUPPORTED_LLVM_VERSION=$(echo \($LlvmVersion\) | sed 's/\./,/')

Loading…
Cancel
Save