[disabled-packages] ghc: went to unstable-packages

https://github.com/termux/unstable-packages/pull/181
This commit is contained in:
Leonid Pliushch 2020-06-20 23:28:56 +03:00
parent d67233426d
commit 89951194a3
5 changed files with 0 additions and 136 deletions

View File

@ -1,30 +0,0 @@
From
https://github.com/erikd/ghc-llvm-next/blob/llvm-3.8/patches/01-bitcast.patch
diff -u -r ../ghc-8.0.1/compiler/llvmGen/Llvm/PpLlvm.hs ./compiler/llvmGen/Llvm/PpLlvm.hs
--- ../ghc-8.0.1/compiler/llvmGen/Llvm/PpLlvm.hs 2016-05-16 13:08:53.000000000 -0400
+++ ./compiler/llvmGen/Llvm/PpLlvm.hs 2016-06-23 16:59:36.113778783 -0400
@@ -73,7 +73,7 @@
Nothing -> empty
rhs = case dat of
- Just stat -> ppr stat
+ Just stat -> pprSpecialStatic stat
Nothing -> ppr (pLower $ getVarType var)
-- Position of linkage is different for aliases.
diff -u -r ../ghc-8.0.1/compiler/llvmGen/Llvm/Types.hs ./compiler/llvmGen/Llvm/Types.hs
--- ../ghc-8.0.1/compiler/llvmGen/Llvm/Types.hs 2016-05-16 13:08:53.000000000 -0400
+++ ./compiler/llvmGen/Llvm/Types.hs 2016-06-23 17:00:14.569166114 -0400
@@ -175,6 +175,11 @@
ppr (LMSub s1 s2)
= pprStaticArith s1 s2 (sLit "sub") (sLit "fsub") "LMSub"
+pprSpecialStatic :: LlvmStatic -> SDoc
+pprSpecialStatic (LMBitc v t) =
+ ppr (pLower t) <> text ", bitcast (" <> ppr v <> text " to " <> ppr t <> char ')'
+pprSpecialStatic stat = ppr stat
+
pprStaticArith :: LlvmStatic -> LlvmStatic -> LitString -> LitString -> String -> SDoc
pprStaticArith s1 s2 int_op float_op op_name =
let ty1 = getStatType s1

View File

@ -1,47 +0,0 @@
# See https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling
# https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux
# and
# https://github.com/neurocyte/ghc-android
TERMUX_PKG_HOMEPAGE=https://www.haskell.org/ghc/
TERMUX_PKG_DESCRIPTION="The Glasgow Haskell Compilation system"
TERMUX_PKG_VERSION=8.0.1
TERMUX_PKG_SRCURL=http://downloads.haskell.org/~ghc/${TERMUX_PKG_VERSION}/ghc-${TERMUX_PKG_VERSION}-src.tar.xz
TERMUX_PKG_BUILD_IN_SRC=true
# Depend on clang for now until llvm is split into separate package:
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=x86_64-unknown-linux --build=x86_64-unknown-linux"
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
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --target=${TERMUX_HOST_PLATFORM}"
}
termux_step_pre_configure() {
echo "INTEGER_LIBRARY = integer-simple" > mk/build.mk
#echo "GhcStage2HcOpts = $ORIG_CFLAGS $ORIG_CPPFLAGS $ORIG_LDFLAGS" >> mk/build.mk
# Avoid "Can't use -fPIC or -dynamic on this platform":
echo "DYNAMIC_GHC_PROGRAMS = NO" >> mk/build.mk
echo "GhcLibWays = v" >> mk/build.mk
# "Can not build haddock docs when CrossCompiling or Stage1Only".
echo "HADDOCK_DOCS=NO" >> mk/build.mk
}

View File

@ -1,32 +0,0 @@
diff -u -r ../ghc-8.0.1/compiler/llvmGen/LlvmCodeGen/Ppr.hs ./compiler/llvmGen/LlvmCodeGen/Ppr.hs
--- ../ghc-8.0.1/compiler/llvmGen/LlvmCodeGen/Ppr.hs 2016-05-16 13:08:53.000000000 -0400
+++ ./compiler/llvmGen/LlvmCodeGen/Ppr.hs 2016-06-23 17:54:27.073877144 -0400
@@ -44,12 +44,18 @@
Platform { platformArch = ArchX86, platformOS = OSLinux } ->
text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32\""
$+$ text "target triple = \"i386-pc-linux-gnu\""
+ Platform { platformArch = ArchX86, platformOS = OSAndroid } ->
+ text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32\""
+ $+$ text "target triple = \"i386-pc-linux-android\""
Platform { platformArch = ArchX86_64, platformOS = OSDarwin } ->
text "target datalayout = \"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64\""
$+$ text "target triple = \"x86_64-apple-darwin10.0.0\""
Platform { platformArch = ArchX86_64, platformOS = OSLinux } ->
text "target datalayout = \"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64\""
$+$ text "target triple = \"x86_64-linux-gnu\""
+ Platform { platformArch = ArchX86_64, platformOS = OSAndroid } ->
+ text "target datalayout = \"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64\""
+ $+$ text "target triple = \"x86_64-linux-android\""
Platform { platformArch = ArchARM {}, platformOS = OSLinux } ->
text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32\""
$+$ text "target triple = \"armv6-unknown-linux-gnueabihf\""
@@ -71,6 +77,9 @@
Platform { platformArch = ArchARM64, platformOS = OSLinux } ->
text "target datalayout = \"e-m:e-i64:64-i128:128-n32:64-S128\""
$+$ text "target triple = \"aarch64-unknown-linux-gnu\""
+ Platform { platformArch = ArchARM64, platformOS = OSAndroid } ->
+ text "target datalayout = \"e-m:e-i64:64-i128:128-n32:64-S128\""
+ $+$ text "target triple = \"aarch64-unknown-linux-android\""
_ ->
if platformIsCrossCompiling platform
then panic "LlvmCodeGen.Ppr: Cross compiling without valid target info."

View File

@ -1,15 +0,0 @@
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

View File

@ -1,12 +0,0 @@
diff -u -r ../ghc-8.0.1/configure ./configure
--- ../ghc-8.0.1/configure 2016-05-17 12:36:51.000000000 -0400
+++ ./configure 2016-06-23 16:46:28.690875698 -0400
@@ -7126,7 +7126,7 @@
# tools we are looking for. In the past, GHC supported a number of
# versions of LLVM simultaneously, but that stopped working around
# 3.5/3.6 release of LLVM.
-LlvmVersion=3.7
+LlvmVersion=3.9
sUPPORTED_LLVM_VERSION=$(echo \($LlvmVersion\) | sed 's/\./,/')