All, I have tested it, and it works. During installation it failed saying that some file libffi-6.dll doesn't exist. I fixed it with a touch command: touch /Users/stephenblackheath/install/usr/local/ghc-ios-steve/lib/ghc-7.7.20130328/rts-1.0/libffi-6.dll Then re-did 'sudo make install' Looks like the makefiles are a bit poked on mainline at the moment. Steve On 29/03/13 01:55, Stephen Blackheath [to GHC-iPhone] wrote:
Stefan,
Here is the exact procedure I just did to successfully build the GHC-iOS cross compiler:
git clone git@github.com:ghc-ios/ghc.git ghc-ios cd ghc-ios git checkout master-merge-ios cp arm-apple-darwin10-bin/* ~/bin/ (<-- ~/bin is in my PATH)
I edited ~/bin/arm-apple-darwin10-gcc to change the -march option to armv7, like this, because that's what my iPod touch has:
TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -march=armv7 -mcpu=cortex-a8 -mfpu=neon"
git checkout master git remote set-url origin http://darcs.haskell.org/ghc.git/ ./sync-all --no-dph get wget http://hackage.haskell.org/trac/ghc/raw-attachment/ticket/7759/ios-patch-14a...
wget http://hackage.haskell.org/trac/ghc/raw-attachment/ticket/7760/ios-patch-15a...
cd libraries/base cat ../../ios-patch-14a-libraries-base.patch | patch -p1 cd ../../utils/hsc2hs/ cat ../../ios-patch-15a-against-hsc2hs-remove-HSC2HS_EXTRA-from-stage0-wrapper.patch | patch -p1 cd ../.. git remote set-url origin git@github.com:ghc-ios/ghc.git git checkout master-merge-ios cat > mk/build.mk HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO BUILD_DOCBOOK_PS = NO BUILD_DOCBOOK_PDF = NO SPLIT_OBJS = NO INTEGER_LIBRARY = integer-simple Stage1Only = YES DYNAMIC_GHC_PROGRAMS = NO GhcLibWays = v <ctrl-D> perl boot ./configure --target=arm-apple-darwin10 --prefix=/usr/local/ghc-ios-steve make
When you get this: ghc-stage1: panic! (the 'impossible' happened) (GHC version 7.7.20130328 for arm-apple-ios): expectJust initTcInteractive just type 'make' again
I am using: ghc-7.4.2 as my bootstrap ghc compiler
thopminkringscrape:ghc-ios stephenblackheath$ llc --version Low Level Virtual Machine (http://llvm.org/): llvm version 3.0 Optimized build. Built Aug 10 2012 (18:51:37). Host: x86_64-apple-darwin12.3.0 Host CPU: i686
This is the head for master-merge-ios branch: commit 942b130ada7be3f608286da934026e2c162d9527 Merge: 97274b1 81d55a9 Author: Stephen Blackheath <..> Date: Thu Mar 28 23:51:02 2013 +1300
Merge branch 'master' into master-merge-ios
would you mind uploading somewhere a source tree that builds for you? Sorry - I'm not really able to do that at the moment.
you mean the architecture compiled for? armv7 vs armv7s? That's right.
I have not actually run this version yet.
Steve
On 28/03/13 23:21, Stefan Kersten wrote:
hi steve,
On 26 Mar 2013, at 20:36, "Stephen Blackheath [to GHC-iPhone]"
wrote: The rev you mentioned _definitely_ works.
Check that you're using llvm version 3.0 or >= 3.2. Llvm version 3.1 is broken.
i'm using llvm version 3.2, 3.0 doesn't compile anymore with the newest toolchain. still no joy, started from scratch and now having trouble getting as far as i already got. if you have the time and resources, would you mind uploading somewhere a source tree that builds for you? which osx+xcode+llvm are you using?
If it's not that, then it could be something to do with ARM variants.
you mean the architecture compiled for? armv7 vs armv7s?
many thanks + best, sk