Permalink
Browse files

Do not link with threaded RTS on ARM.

GHC on ARM doesn't have a threaded RTS, which makes it impossible to build
cabal-install without editing the source by hand (see #1129). This patch makes
cabal-install compile out of the box on ARM.
  • Loading branch information...
1 parent a079a1a commit 074691a069795fdad0a950e1799782ef79daaa91 @23Skidoo 23Skidoo committed Nov 23, 2012
Showing with 6 additions and 2 deletions.
  1. +5 −1 cabal-install/cabal-install.cabal
  2. +1 −1 cabal-install/cbits/getnumcores.c
@@ -38,7 +38,11 @@ flag bytestring-in-base
Executable cabal
Main-Is: Main.hs
- ghc-options: -Wall -threaded
+ ghc-options: -Wall
+ if !arch(arm)
+ ghc-options: -threaded
+ else
+ cc-options: -DCABAL_NO_THREADED
if impl(ghc >= 6.8)
ghc-options: -fwarn-tabs
Other-Modules:
@@ -1,4 +1,4 @@
-#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 612)
+#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 612) && !defined(CABAL_NO_THREADED)
/* Since version 6.12, GHC's threaded RTS includes a getNumberOfProcessors
function, so we try to use that if available. cabal-install is always built
with -threaded nowadays. */

0 comments on commit 074691a

Please sign in to comment.