From 754ee9ac2015af2ebf1f6e9a3ca202ff9bc0714a Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 15:00:26 +0000 Subject: [PATCH 01/45] Fix the CURL download lines --- installGHCiOS.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installGHCiOS.sh b/installGHCiOS.sh index e13087e..780c326 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -13,7 +13,7 @@ fi echo "Downloading GHC for iOS devices..." -curl -O https://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-arm-apple-ios.tar.xz +curl -OL https://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-arm-apple-ios.tar.xz tar xvf ghc-7.8.3-arm-apple-ios.tar.xz && mv ghc-7.8.3 ghc-7.8.3-arm rm ghc-7.8.3-arm-apple-ios.tar.xz cd ghc-7.8.3-arm @@ -35,7 +35,7 @@ rm -r ghc-7.8.3-arm echo "Downloading GHC for the iOS simulator..." cd /tmp -curl -O https://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-i386-apple-ios.tar.xz +curl -OL https://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-i386-apple-ios.tar.xz tar xvf ghc-7.8.3-i386-apple-ios.tar.xz && mv ghc-7.8.3 ghc-7.8.3-i386 rm ghc-7.8.3-i386-apple-ios.tar.xz cd ghc-7.8.3-i386 From 19cbfc704ada7264d5a1f5217d00368b86c5c6b4 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 16:02:39 +0000 Subject: [PATCH 02/45] First attempt at a Docker base image configuration --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..941d75c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +### +# This compiles a Docker base image of the ghc-ios compiler. +# This would be useful for downstream projects that want a Haskell platform Docker base +# image which supports iOS cross-compilation, to avoid having to install ghc-ios in their +# own project-specific Docker images. + +# Preinstall regular Haskell platform +FROM haskell:7.8 + +MAINTAINER Chris Kilding + +# Add current repo contents +ADD . /usr/src/app + +WORKDIR /usr/src/app + +RUN installGHCiOS.sh + +CMD ["ghc-ios"] \ No newline at end of file From db69e6329ff5bbc5d2e9c0562183953c98d10bff Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 16:12:58 +0000 Subject: [PATCH 03/45] Fix reference to install script in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 941d75c..d15899e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,6 @@ ADD . /usr/src/app WORKDIR /usr/src/app -RUN installGHCiOS.sh +RUN ./installGHCiOS.sh CMD ["ghc-ios"] \ No newline at end of file From 154fc44ecd490f8a8bd8d086cf3ac808628429d6 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 16:20:07 +0000 Subject: [PATCH 04/45] Add project dir to path in Dockerfile --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d15899e..5e693b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ # This would be useful for downstream projects that want a Haskell platform Docker base # image which supports iOS cross-compilation, to avoid having to install ghc-ios in their # own project-specific Docker images. +### # Preinstall regular Haskell platform FROM haskell:7.8 @@ -11,9 +12,12 @@ MAINTAINER Chris Kilding # Add current repo contents ADD . /usr/src/app - WORKDIR /usr/src/app +# Add the project directory to the path +ENV PATH /usr/src/app/ghc-ios-scripts:$PATH + +# Run the installer RUN ./installGHCiOS.sh CMD ["ghc-ios"] \ No newline at end of file From beb299435d76fab4dda8326d387728abbd9378e8 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 16:28:58 +0000 Subject: [PATCH 05/45] Nope, do it the way the README does it --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5e693b5..61110d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,15 @@ FROM haskell:7.8 MAINTAINER Chris Kilding # Add current repo contents -ADD . /usr/src/app -WORKDIR /usr/src/app +# Mirror the workdir structure suggested from the README, +# but we cannot use relative paths in a Dockerfile ADD command, +# so must use the absolute /usr top level directory. +ADD . /usr/bin/ghc-ios-scripts +WORKDIR /usr/bin/ghc-ios-scripts # Add the project directory to the path -ENV PATH /usr/src/app/ghc-ios-scripts:$PATH +RUN echo -e "\nPATH=/usr/bin/ghc-ios-scripts:"'$PATH' >> ~/.profile +RUN PATH=/usr/bin/ghc-ios-scripts:$PATH # Run the installer RUN ./installGHCiOS.sh From 9c127551435d9b2001902f51554406464c7351ae Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 16:48:33 +0000 Subject: [PATCH 06/45] Fix which clang+llvm version is used on Docker --- installGHCiOS.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/installGHCiOS.sh b/installGHCiOS.sh index 780c326..2c536d3 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -4,10 +4,17 @@ cd /tmp if [[ ! -f /usr/local/clang-3.0/bin/llc ]]; then echo "Downloading LLVM 3.0..." - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 - rm clang+llvm-3.0-x86_64-apple-darwin11.tar.gz + + # On the Haskell Docker base image (which is Debian Wheezy based) + # we need the Debian version of clang+llvm + curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-linux-debian.tar.gz + + # The OSX version would have been + # curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz + + tar xvf clang+llvm-3.0-x86_64-linux-debian.tar.gz + mv clang+llvm-3.0-x86_64-linux-debian /usr/local/clang-3.0 + rm clang+llvm-3.0-x86_64-linux-debian.tar.gz fi From f8692c455fc580343a0289d04918548d9ed48fa2 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 16:57:02 +0000 Subject: [PATCH 07/45] Install curl before script runs on docker --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 61110d9..97556cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,10 @@ WORKDIR /usr/bin/ghc-ios-scripts RUN echo -e "\nPATH=/usr/bin/ghc-ios-scripts:"'$PATH' >> ~/.profile RUN PATH=/usr/bin/ghc-ios-scripts:$PATH +# Need CURL on the system for the script to work +RUN apt-get update +RUN apt-get -y install curl + # Run the installer RUN ./installGHCiOS.sh From 6c5321af27d30486a6bca15f5346e4b45d3fb81d Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 17:21:23 +0000 Subject: [PATCH 08/45] Extract platform-specific LLVM install to Dockerfile --- Dockerfile | 8 ++++++++ installGHCiOS.sh | 14 ++------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 97556cc..e453784 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,14 @@ RUN PATH=/usr/bin/ghc-ios-scripts:$PATH RUN apt-get update RUN apt-get -y install curl +# Get LLVM 3.0 for the target platform +# On the Haskell Docker base image (which is Debian Wheezy based) +# we need the Debian version of clang+llvm +RUN curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-linux-debian.tar.gz +RUN tar xvf clang+llvm-3.0-x86_64-linux-debian.tar.gz +RUN mv clang+llvm-3.0-x86_64-linux-debian /usr/local/clang-3.0 +RUN rm clang+llvm-3.0-x86_64-linux-debian.tar.gz + # Run the installer RUN ./installGHCiOS.sh diff --git a/installGHCiOS.sh b/installGHCiOS.sh index 2c536d3..2361ad7 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -3,18 +3,8 @@ cd /tmp if [[ ! -f /usr/local/clang-3.0/bin/llc ]]; then - echo "Downloading LLVM 3.0..." - - # On the Haskell Docker base image (which is Debian Wheezy based) - # we need the Debian version of clang+llvm - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-linux-debian.tar.gz - - # The OSX version would have been - # curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - - tar xvf clang+llvm-3.0-x86_64-linux-debian.tar.gz - mv clang+llvm-3.0-x86_64-linux-debian /usr/local/clang-3.0 - rm clang+llvm-3.0-x86_64-linux-debian.tar.gz + echo "ERROR: LLVM 3.0 must be installed on your platform to proceed." + exit 1 fi From bd06d9a04705f4168c81dabb023184cb5e4c75fc Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 17:34:16 +0000 Subject: [PATCH 09/45] First attempt at a Travis CI configuration --- .travis.yml | 14 ++++++++++++++ .travis/helloworld.hs | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 .travis.yml create mode 100644 .travis/helloworld.hs diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2a195b4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: objective-c + +# Get LLVM 3.0 before the script +before_install: + - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz + - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz + - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 + - rm clang+llvm-3.0-x86_64-apple-darwin11.tar.gz + +install: ./installGHCiOS.sh + +# Try compiling a hello world Haskell file +# to see if ghc-ios is working. +script: ghc-ios .travis/helloworld.hs diff --git a/.travis/helloworld.hs b/.travis/helloworld.hs new file mode 100644 index 0000000..ae6eac4 --- /dev/null +++ b/.travis/helloworld.hs @@ -0,0 +1,4 @@ +module Main + where + +main=putStrLn "Hello, World!" From fc07030852e97641e12d52085ed2c9c46f4f8b70 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 17:48:04 +0000 Subject: [PATCH 10/45] Install cabal before running script on Travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2a195b4..3c0c881 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ language: objective-c -# Get LLVM 3.0 before the script +# Get Cabal and LLVM 3.0 before the script before_install: + - brew install ghc cabal-install - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 From 6e294b6c4e45ea298f1ce6bf01f329a6c68e8e51 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 17 Mar 2015 18:09:47 +0000 Subject: [PATCH 11/45] Add working dir to PATH on travis ci, just as readme says --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3c0c881..7e3b0eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,19 @@ language: objective-c -# Get Cabal and LLVM 3.0 before the script +# Get Cabal +# Get LLVM 3.0 +# Add to the PATH before_install: - brew install ghc cabal-install + - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile + - PATH=`pwd`:$PATH - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 - rm clang+llvm-3.0-x86_64-apple-darwin11.tar.gz -install: ./installGHCiOS.sh +# Due to PATH alterations the preceding ./ is in theory unnecessary. +install: installGHCiOS.sh # Try compiling a hello world Haskell file # to see if ghc-ios is working. From 4e1e831b414aac6b0cbf3cf2af3efb89e1635e7d Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Thu, 19 Mar 2015 15:12:57 +0000 Subject: [PATCH 12/45] Define $TARGET_LD variable in the i386 ld script to avoid exec errors --- i386-apple-darwin11-ld | 2 ++ 1 file changed, 2 insertions(+) diff --git a/i386-apple-darwin11-ld b/i386-apple-darwin11-ld index 2d18814..b90905b 100755 --- a/i386-apple-darwin11-ld +++ b/i386-apple-darwin11-ld @@ -2,6 +2,8 @@ TARGET_PLATFORM=`xcrun --show-sdk-platform-path --sdk iphonesimulator` TARGET_BIN=`xcrun --show-sdk-platform-path --sdk iphonesimulator`/Developer/usr/bin + +TARGET_LD=$TARGET_BIN/ld TARGET_LDFLAGS="-L$TARGET_PLATFORM/usr/lib/ -arch i386" exec $TARGET_LD $TARGET_LDFLAGS "$@" \ No newline at end of file From 42edf59e45139d0a3b1909fd01b43d89ed0b6d22 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 24 Mar 2015 13:58:26 +0000 Subject: [PATCH 13/45] Print where g++/gcc are coming from, maybe we could remove them --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7e3b0eb..d948e57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ language: objective-c # Get LLVM 3.0 # Add to the PATH before_install: + - which gcc + - which g++ - brew install ghc cabal-install - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile - PATH=`pwd`:$PATH From da256a37433918daf56adc614115debbc11538f2 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 24 Mar 2015 14:00:31 +0000 Subject: [PATCH 14/45] Check homebrew status of gcc in travis environment --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d948e57..00886de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ language: objective-c before_install: - which gcc - which g++ + - brew info gcc - brew install ghc cabal-install - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile - PATH=`pwd`:$PATH From 11b9698478833a560dafdcc6e0c1264ab8c500df Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 24 Mar 2015 14:04:34 +0000 Subject: [PATCH 15/45] =?UTF-8?q?Uninstall=20brew=E2=80=99s=20gcc=20to=20s?= =?UTF-8?q?top=20make=20scripts=20using=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 00886de..8de4730 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: objective-c +# Remove homebrew gcc to see if this stops make scripts using it # Get Cabal # Get LLVM 3.0 # Add to the PATH @@ -7,6 +8,7 @@ before_install: - which gcc - which g++ - brew info gcc + - brew uninstall gcc - brew install ghc cabal-install - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile - PATH=`pwd`:$PATH From eae4f4101b2c4e5f810ba036e7f755245f5c7784 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 24 Mar 2015 15:24:10 +0000 Subject: [PATCH 16/45] Print more info about gcc on travis --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8de4730..df23748 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,15 @@ language: objective-c # Get LLVM 3.0 # Add to the PATH before_install: + - echo "Before removing gcc" - which gcc - which g++ - brew info gcc - - brew uninstall gcc + - brew uninstall --force gcc + - echo "After removing gcc" + - which gcc + - which g++ + - echo $CXX - brew install ghc cabal-install - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile - PATH=`pwd`:$PATH From d64c15c689928a28e14f61771978e8455e834906 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Thu, 26 Mar 2015 10:58:50 +0000 Subject: [PATCH 17/45] Remove offending jobs: bit like readme says --- .travis.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index df23748..5431ea4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,12 @@ language: objective-c - -# Remove homebrew gcc to see if this stops make scripts using it + # Get Cabal +# Remove the cabal config containing $ncpus a la readme # Get LLVM 3.0 # Add to the PATH before_install: - - echo "Before removing gcc" - - which gcc - - which g++ - - brew info gcc - - brew uninstall --force gcc - - echo "After removing gcc" - - which gcc - - which g++ - - echo $CXX - brew install ghc cabal-install + - rm ~/.cabal/config - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile - PATH=`pwd`:$PATH - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz From 5b26c673238a9b893e5b8a4a5a1fe202dc45fa86 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Thu, 26 Mar 2015 11:17:46 +0000 Subject: [PATCH 18/45] Try to remove the ncpus line more precisely on travis --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5431ea4..710a71e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,10 @@ language: objective-c # Get LLVM 3.0 # Add to the PATH before_install: + - pwd - brew install ghc cabal-install - - rm ~/.cabal/config + - cat travis/config + - sed -i '' '/jobs: $ncpus/d' ~/.cabal/config - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile - PATH=`pwd`:$PATH - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz From 8f0bfacde7df4be52b91455827b4543080b26436 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Sun, 29 Mar 2015 13:54:50 +0100 Subject: [PATCH 19/45] Try supplying a cabal config that *we* control on travis --- .travis.yml | 4 +-- .travis/cabal-config | 78 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 .travis/cabal-config diff --git a/.travis.yml b/.travis.yml index 710a71e..9c6c280 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ language: objective-c before_install: - pwd - brew install ghc cabal-install - - cat travis/config - - sed -i '' '/jobs: $ncpus/d' ~/.cabal/config + - mkdir -p ~/.cabal + - cp .travis/cabal-config ~/.cabal/config - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile - PATH=`pwd`:$PATH - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz diff --git a/.travis/cabal-config b/.travis/cabal-config new file mode 100644 index 0000000..2eb0bf2 --- /dev/null +++ b/.travis/cabal-config @@ -0,0 +1,78 @@ +-- This is the configuration file for the 'cabal' command line tool. + +-- The available configuration options are listed below. +-- Some of them have default values listed. + +-- Lines (like this one) beginning with '--' are comments. +-- Be careful with spaces and indentation because they are +-- used to indicate layout for nested sections. + +-- Cabal library version: 1.22.1.0 +-- cabal-install version: 1.22.0.1 + + +-- require-sandbox: False +-- ignore-sandbox: False +remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive +-- remote-repo-cache: /Users/travis/.cabal/packages +-- local-repo: +-- logs-dir: +-- world-file: /Users/travis/.cabal/world +-- verbose: 1 +-- compiler: ghc +-- with-compiler: +-- with-hc-pkg: +-- program-prefix: +-- program-suffix: +-- library-vanilla: True +-- library-profiling: +-- shared: +-- executable-dynamic: False +-- profiling: +-- executable-profiling: +-- optimization: True +-- debug-info: False +-- library-for-ghci: +-- split-objs: False +-- executable-stripping: True +-- library-stripping: True +-- configure-option: +-- user-install: True +-- package-db: +-- flags: +-- extra-include-dirs: +-- extra-lib-dirs: +-- extra-prog-path: /Users/travis/.cabal/bin +-- instantiate-with: +-- tests: False +-- coverage: False +-- library-coverage: +-- exact-configuration: False +-- benchmarks: False +-- relocatable: False +-- cabal-lib-version: +-- constraint: +-- preference: +-- solver: choose +-- allow-newer: False +-- documentation: False +-- doc-index-file: $datadir/doc/$arch-$os-$compiler/index.html +-- max-backjumps: 2000 +-- reorder-goals: False +-- shadow-installed-packages: False +-- strong-flags: False +-- reinstall: False +-- avoid-reinstalls: False +-- force-reinstalls: False +-- upgrade-dependencies: False +-- root-cmd: +-- symlink-bindir: +-- build-summary: /Users/travis/.cabal/logs/build.log +-- build-log: +remote-build-reporting: anonymous +-- report-planning-failure: False +-- one-shot: False +-- run-tests: +-- username: +-- password: + From 3c08bced638e2ac1bd3d4c6bb35e07a3be45cfc5 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Sun, 29 Mar 2015 14:07:18 +0100 Subject: [PATCH 20/45] Create ~/.cabal/config before trying to edit it on travis --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9c6c280..9f2b4aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,15 @@ language: objective-c # Get Cabal +# Trigger creation of ~/.cabal/config by running a cabal command # Remove the cabal config containing $ncpus a la readme # Get LLVM 3.0 # Add to the PATH before_install: - pwd - brew install ghc cabal-install - - mkdir -p ~/.cabal - - cp .travis/cabal-config ~/.cabal/config + - cabal update + - sed -i '' '/jobs: $ncpus/d' ~/.cabal/config - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile - PATH=`pwd`:$PATH - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz From 4923c0ed321e5cf2bc04ebe96b54707399da5d3d Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Sun, 29 Mar 2015 14:39:42 +0100 Subject: [PATCH 21/45] See if we can access the cabal config on travis before changing it --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9f2b4aa..1bdd4f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ before_install: - pwd - brew install ghc cabal-install - cabal update + - cat /Users/travis/.cabal/config + - cat ~/.cabal/config - sed -i '' '/jobs: $ncpus/d' ~/.cabal/config - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile - PATH=`pwd`:$PATH From f287ee2b8150b0f6203d94807c63924f36feedd2 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Sun, 29 Mar 2015 14:45:23 +0100 Subject: [PATCH 22/45] Try to stop YAML processing of the sed command on travis --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1bdd4f6..a6023df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,11 +9,13 @@ before_install: - pwd - brew install ghc cabal-install - cabal update - - cat /Users/travis/.cabal/config - cat ~/.cabal/config - - sed -i '' '/jobs: $ncpus/d' ~/.cabal/config + - sed -i "" "/jobs: $ncpus/d" ~/.cabal/config + - cat ~/.cabal/config - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile + - cat ~/.profile - PATH=`pwd`:$PATH + - echo $PATH - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 From b7b459a4d768f3b208928333a4fac11218ff8a35 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Sun, 29 Mar 2015 14:54:23 +0100 Subject: [PATCH 23/45] Quote the whole sed command on travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a6023df..13516fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ before_install: - brew install ghc cabal-install - cabal update - cat ~/.cabal/config - - sed -i "" "/jobs: $ncpus/d" ~/.cabal/config + - "sed -i '' '/jobs: $ncpus/d' ~/.cabal/config" - cat ~/.cabal/config - echo -e "\nPATH=`pwd`:"'$PATH' >> ~/.profile - cat ~/.profile From a436212b4cab711bddabc066e56075618450e286 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Sun, 29 Mar 2015 15:48:32 +0100 Subject: [PATCH 24/45] Try rolling back ghc to 7.8.2 as in bug reports --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 13516fc..1fd0318 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ language: objective-c before_install: - pwd - brew install ghc cabal-install + - brew switch ghc 7.8.2 - cabal update - cat ~/.cabal/config - "sed -i '' '/jobs: $ncpus/d' ~/.cabal/config" @@ -16,6 +17,8 @@ before_install: - cat ~/.profile - PATH=`pwd`:$PATH - echo $PATH + - ghc --version + - cabal -V - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 From 2b46e97ed1b57193d692fe061c7d5212efc3371c Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Sun, 29 Mar 2015 15:56:30 +0100 Subject: [PATCH 25/45] Revert "Try rolling back ghc to 7.8.2 as in bug reports" This reverts commit a436212b4cab711bddabc066e56075618450e286. --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1fd0318..13516fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ language: objective-c before_install: - pwd - brew install ghc cabal-install - - brew switch ghc 7.8.2 - cabal update - cat ~/.cabal/config - "sed -i '' '/jobs: $ncpus/d' ~/.cabal/config" @@ -17,8 +16,6 @@ before_install: - cat ~/.profile - PATH=`pwd`:$PATH - echo $PATH - - ghc --version - - cabal -V - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 From e2cd1555fe0edf001b2e7981713c635b9ad1cd59 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Sun, 29 Mar 2015 15:57:43 +0100 Subject: [PATCH 26/45] Print ghc and cabal versions for debug on travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 13516fc..5ba8ab0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,8 @@ before_install: - cat ~/.profile - PATH=`pwd`:$PATH - echo $PATH + - ghc --version + - cabal -V - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 From 5defa8cc72bdb8008f322c030afb466b20224be1 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 19:38:12 +0100 Subject: [PATCH 27/45] =?UTF-8?q?Readme=20never=20mentions=20installing=20?= =?UTF-8?q?ghc=20beforehand=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5ba8ab0..fc625b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ language: objective-c # Add to the PATH before_install: - pwd - - brew install ghc cabal-install + - brew install cabal-install - cabal update - cat ~/.cabal/config - "sed -i '' '/jobs: $ncpus/d' ~/.cabal/config" @@ -16,7 +16,6 @@ before_install: - cat ~/.profile - PATH=`pwd`:$PATH - echo $PATH - - ghc --version - cabal -V - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz From adbdd65448caa7b8b7ed7d997d63878d2f994da0 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 21:19:07 +0100 Subject: [PATCH 28/45] Log OSX version on Travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index fc625b6..34c4d3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: objective-c +# Log build system information (illegal instruction errors are fickle) # Get Cabal # Trigger creation of ~/.cabal/config by running a cabal command # Remove the cabal config containing $ncpus a la readme @@ -7,6 +8,7 @@ language: objective-c # Add to the PATH before_install: - pwd + - sw_vers - brew install cabal-install - cabal update - cat ~/.cabal/config From 997597e4d687f3cd19f2d8b14596186e5379ff5f Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 21:30:41 +0100 Subject: [PATCH 29/45] Try compiling anything with the regular brew GHC on travis --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34c4d3c..29c03c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,11 @@ language: objective-c # Remove the cabal config containing $ncpus a la readme # Get LLVM 3.0 # Add to the PATH +# Try compiling the hello world example with the baseline x64-class GHC before_install: - pwd - sw_vers - - brew install cabal-install + - brew install ghc cabal-install - cabal update - cat ~/.cabal/config - "sed -i '' '/jobs: $ncpus/d' ~/.cabal/config" @@ -18,15 +19,17 @@ before_install: - cat ~/.profile - PATH=`pwd`:$PATH - echo $PATH + - ghc --version - cabal -V - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 - rm clang+llvm-3.0-x86_64-apple-darwin11.tar.gz + - ghc -v .travis/helloworld.hs # Due to PATH alterations the preceding ./ is in theory unnecessary. install: installGHCiOS.sh # Try compiling a hello world Haskell file # to see if ghc-ios is working. -script: ghc-ios .travis/helloworld.hs +script: ghc-ios -v .travis/helloworld.hs From 995520f2f358762747253adccaabfae9a839e557 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 21:47:56 +0100 Subject: [PATCH 30/45] Try pinning min OS X version in CFLAGS for travis --- aarch64-apple-darwin14-clang | 2 +- arm-apple-darwin10-clang | 2 +- i386-apple-darwin11-clang | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aarch64-apple-darwin14-clang b/aarch64-apple-darwin14-clang index b9ec0db..f917bd9 100755 --- a/aarch64-apple-darwin14-clang +++ b/aarch64-apple-darwin14-clang @@ -2,6 +2,6 @@ TARGET_PLATFORM=`xcrun --show-sdk-path --sdk iphoneos` # TARGET_GCC=`xcrun -f clang` TARGET_GCC=/usr/local/opt/llvm/bin/clang -TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -arch arm64 -miphoneos-version-min=7.0" +TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -arch arm64 -miphoneos-version-min=7.0 -mmacosx-version-min=10.9" exec $TARGET_GCC $TARGET_CFLAGS "$@" \ No newline at end of file diff --git a/arm-apple-darwin10-clang b/arm-apple-darwin10-clang index 6ee3b2d..15273ea 100755 --- a/arm-apple-darwin10-clang +++ b/arm-apple-darwin10-clang @@ -2,7 +2,7 @@ TARGET_PLATFORM=`xcrun --show-sdk-path --sdk iphoneos` TARGET_GCC=`xcrun -f clang` -TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -miphoneos-version-min=7.0" +TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -miphoneos-version-min=7.0 -mmacosx-version-min=10.9" args=$@ diff --git a/i386-apple-darwin11-clang b/i386-apple-darwin11-clang index dccae5f..8ae894c 100755 --- a/i386-apple-darwin11-clang +++ b/i386-apple-darwin11-clang @@ -2,6 +2,6 @@ TARGET_PLATFORM=`xcrun --show-sdk-path --sdk iphonesimulator` TARGET_GCC=`xcrun -f clang` -TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -arch i386 -mios-simulator-version-min=7.0" +TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -arch i386 -mios-simulator-version-min=7.0 -mmacosx-version-min=10.9" exec $TARGET_GCC $TARGET_CFLAGS "$@" \ No newline at end of file From 3873c8d1e16f443f62674fb32493e48bae524c98 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 22:01:58 +0100 Subject: [PATCH 31/45] Revert "Try pinning min OS X version in CFLAGS for travis" This reverts commit 995520f2f358762747253adccaabfae9a839e557. --- aarch64-apple-darwin14-clang | 2 +- arm-apple-darwin10-clang | 2 +- i386-apple-darwin11-clang | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aarch64-apple-darwin14-clang b/aarch64-apple-darwin14-clang index f917bd9..b9ec0db 100755 --- a/aarch64-apple-darwin14-clang +++ b/aarch64-apple-darwin14-clang @@ -2,6 +2,6 @@ TARGET_PLATFORM=`xcrun --show-sdk-path --sdk iphoneos` # TARGET_GCC=`xcrun -f clang` TARGET_GCC=/usr/local/opt/llvm/bin/clang -TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -arch arm64 -miphoneos-version-min=7.0 -mmacosx-version-min=10.9" +TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -arch arm64 -miphoneos-version-min=7.0" exec $TARGET_GCC $TARGET_CFLAGS "$@" \ No newline at end of file diff --git a/arm-apple-darwin10-clang b/arm-apple-darwin10-clang index 15273ea..6ee3b2d 100755 --- a/arm-apple-darwin10-clang +++ b/arm-apple-darwin10-clang @@ -2,7 +2,7 @@ TARGET_PLATFORM=`xcrun --show-sdk-path --sdk iphoneos` TARGET_GCC=`xcrun -f clang` -TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -miphoneos-version-min=7.0 -mmacosx-version-min=10.9" +TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -miphoneos-version-min=7.0" args=$@ diff --git a/i386-apple-darwin11-clang b/i386-apple-darwin11-clang index 8ae894c..dccae5f 100755 --- a/i386-apple-darwin11-clang +++ b/i386-apple-darwin11-clang @@ -2,6 +2,6 @@ TARGET_PLATFORM=`xcrun --show-sdk-path --sdk iphonesimulator` TARGET_GCC=`xcrun -f clang` -TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -arch i386 -mios-simulator-version-min=7.0 -mmacosx-version-min=10.9" +TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -arch i386 -mios-simulator-version-min=7.0" exec $TARGET_GCC $TARGET_CFLAGS "$@" \ No newline at end of file From dd94e20623631301b19ec245119ac58fa666fe21 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 22:02:27 +0100 Subject: [PATCH 32/45] Update brew in travis to pick up newer GHC package(?) --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 29c03c5..0dea04d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ language: objective-c before_install: - pwd - sw_vers + - brew update - brew install ghc cabal-install - cabal update - cat ~/.cabal/config From 9ec2ac6e496bbb65a702dd99f5a7b9659182ce5d Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 22:25:39 +0100 Subject: [PATCH 33/45] See if baseline GHC is using the LLVM back end --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0dea04d..53ef5c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ language: objective-c # Get LLVM 3.0 # Add to the PATH # Try compiling the hello world example with the baseline x64-class GHC +# (and check that it has the LLVM back end, GCC back end is no good +# for cross compiling to ARM) before_install: - pwd - sw_vers @@ -26,7 +28,7 @@ before_install: - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 - rm clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - - ghc -v .travis/helloworld.hs + - ghc -fllvm -v .travis/helloworld.hs # Due to PATH alterations the preceding ./ is in theory unnecessary. install: installGHCiOS.sh From 00e0af4a02640e9512a1d8c462be9d896b788326 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 22:54:33 +0100 Subject: [PATCH 34/45] Find out if we already have an acceptable LLVM on Travis --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 53ef5c8..2866d3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,10 +24,7 @@ before_install: - echo $PATH - ghc --version - cabal -V - - curl -O http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - - tar xvf clang+llvm-3.0-x86_64-apple-darwin11.tar.gz - - mv clang+llvm-3.0-x86_64-apple-darwin11 /usr/local/clang-3.0 - - rm clang+llvm-3.0-x86_64-apple-darwin11.tar.gz + - llvm-gcc --version - ghc -fllvm -v .travis/helloworld.hs # Due to PATH alterations the preceding ./ is in theory unnecessary. From 265403ca0d0509058d2aa3ab00f4b1a854a5e2d2 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 23:00:04 +0100 Subject: [PATCH 35/45] Stop invoking LLVM backend of baseline GHC on Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2866d3a..e8613c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ before_install: - ghc --version - cabal -V - llvm-gcc --version - - ghc -fllvm -v .travis/helloworld.hs + - ghc -v .travis/helloworld.hs # Due to PATH alterations the preceding ./ is in theory unnecessary. install: installGHCiOS.sh From f2c352aff806412de9ab4f98d69b1622832710c0 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 23:06:14 +0100 Subject: [PATCH 36/45] Use more generic check for LLVM compiler in shell script --- installGHCiOS.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installGHCiOS.sh b/installGHCiOS.sh index 2361ad7..bbc7e2d 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -2,8 +2,8 @@ cd /tmp -if [[ ! -f /usr/local/clang-3.0/bin/llc ]]; then - echo "ERROR: LLVM 3.0 must be installed on your platform to proceed." +if [[ ! -f llvm-gcc ]]; then + echo "ERROR: LLVM 3.0 or 3.2+ must be installed on your platform to proceed." exit 1 fi From ae317c235d8a5a15630a13b4fd2c74f9eea23948 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 23:17:43 +0100 Subject: [PATCH 37/45] Fix the LLVM check again --- installGHCiOS.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installGHCiOS.sh b/installGHCiOS.sh index bbc7e2d..ac4c250 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -2,10 +2,10 @@ cd /tmp -if [[ ! -f llvm-gcc ]]; then +command -v clang >/dev/null 2>&1 || { echo "ERROR: LLVM 3.0 or 3.2+ must be installed on your platform to proceed." exit 1 -fi +} echo "Downloading GHC for iOS devices..." From d66ae1f8524dd2b5217f8c62911db52d3227a5f9 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Mon, 6 Apr 2015 23:50:03 +0100 Subject: [PATCH 38/45] Try clang+llvm from home-brew --- .travis.yml | 5 +++++ installGHCiOS.sh | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e8613c6..8462794 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,11 @@ before_install: - pwd - sw_vers - brew update + - brew install llvm --with-clang + - ls -l /usr/local/opt/llvm/bin + - ls -l /usr/local/opt/llvm/share/llvm + - which clang + - which llc - brew install ghc cabal-install - cabal update - cat ~/.cabal/config diff --git a/installGHCiOS.sh b/installGHCiOS.sh index ac4c250..f3ddee3 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -24,8 +24,8 @@ find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i ' # Fix the settings file to point to the right scripts and clang versions sed -i '' 's|/usr/bin/gcc|arm-apple-darwin10-clang|g' settings sed -i '' 's|/usr/bin/ld|arm-apple-darwin10-ld|g' settings -sed -i '' 's|"opt"|"/usr/local/clang-3.0/bin/opt"|g' settings -sed -i '' 's|"llc"|"/usr/local/clang-3.0/bin/llc"|g' settings +sed -i '' 's|"opt"|"/usr/local/opt/llvm/bin/opt"|g' settings +sed -i '' 's|"llc"|"/usr/local/opt/llvm/bin/llc"|g' settings make install cd .. rm -r ghc-7.8.3-arm @@ -46,8 +46,8 @@ find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i ' # Fix the settings file to point to the right scripts and clang versions sed -i '' 's|/usr/bin/gcc|i386-apple-darwin11-clang|g' settings sed -i '' 's|/usr/bin/ld|i386-apple-darwin11-ld|g' settings -sed -i '' 's|"opt"|"/usr/local/clang-3.0/bin/opt"|g' settings -sed -i '' 's|"llc"|"/usr/local/clang-3.0/bin/llc"|g' settings +sed -i '' 's|"opt"|"/usr/local/opt/llvm/bin/opt"|g' settings +sed -i '' 's|"llc"|"/usr/local/opt/llvm/bin/llc"|g' settings make install cd .. rm -r ghc-7.8.3-i386 From 8e09df803a19b309414ea702d663977261f51211 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 7 Apr 2015 00:06:59 +0100 Subject: [PATCH 39/45] Revert "Try clang+llvm from home-brew" This reverts commit d66ae1f8524dd2b5217f8c62911db52d3227a5f9. --- .travis.yml | 5 ----- installGHCiOS.sh | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8462794..e8613c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,11 +13,6 @@ before_install: - pwd - sw_vers - brew update - - brew install llvm --with-clang - - ls -l /usr/local/opt/llvm/bin - - ls -l /usr/local/opt/llvm/share/llvm - - which clang - - which llc - brew install ghc cabal-install - cabal update - cat ~/.cabal/config diff --git a/installGHCiOS.sh b/installGHCiOS.sh index f3ddee3..ac4c250 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -24,8 +24,8 @@ find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i ' # Fix the settings file to point to the right scripts and clang versions sed -i '' 's|/usr/bin/gcc|arm-apple-darwin10-clang|g' settings sed -i '' 's|/usr/bin/ld|arm-apple-darwin10-ld|g' settings -sed -i '' 's|"opt"|"/usr/local/opt/llvm/bin/opt"|g' settings -sed -i '' 's|"llc"|"/usr/local/opt/llvm/bin/llc"|g' settings +sed -i '' 's|"opt"|"/usr/local/clang-3.0/bin/opt"|g' settings +sed -i '' 's|"llc"|"/usr/local/clang-3.0/bin/llc"|g' settings make install cd .. rm -r ghc-7.8.3-arm @@ -46,8 +46,8 @@ find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i ' # Fix the settings file to point to the right scripts and clang versions sed -i '' 's|/usr/bin/gcc|i386-apple-darwin11-clang|g' settings sed -i '' 's|/usr/bin/ld|i386-apple-darwin11-ld|g' settings -sed -i '' 's|"opt"|"/usr/local/opt/llvm/bin/opt"|g' settings -sed -i '' 's|"llc"|"/usr/local/opt/llvm/bin/llc"|g' settings +sed -i '' 's|"opt"|"/usr/local/clang-3.0/bin/opt"|g' settings +sed -i '' 's|"llc"|"/usr/local/clang-3.0/bin/llc"|g' settings make install cd .. rm -r ghc-7.8.3-i386 From c8b3d62da0c5bf508962708312a5cac6d3457891 Mon Sep 17 00:00:00 2001 From: Christopher Kilding Date: Tue, 7 Apr 2015 00:13:38 +0100 Subject: [PATCH 40/45] =?UTF-8?q?Don=E2=80=99t=20alias=20opt=20and=20llc?= =?UTF-8?q?=20to=20non=20existent=20places?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installGHCiOS.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/installGHCiOS.sh b/installGHCiOS.sh index ac4c250..c9844f0 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -2,12 +2,6 @@ cd /tmp -command -v clang >/dev/null 2>&1 || { - echo "ERROR: LLVM 3.0 or 3.2+ must be installed on your platform to proceed." - exit 1 -} - - echo "Downloading GHC for iOS devices..." curl -OL https://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-arm-apple-ios.tar.xz @@ -24,8 +18,6 @@ find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i ' # Fix the settings file to point to the right scripts and clang versions sed -i '' 's|/usr/bin/gcc|arm-apple-darwin10-clang|g' settings sed -i '' 's|/usr/bin/ld|arm-apple-darwin10-ld|g' settings -sed -i '' 's|"opt"|"/usr/local/clang-3.0/bin/opt"|g' settings -sed -i '' 's|"llc"|"/usr/local/clang-3.0/bin/llc"|g' settings make install cd .. rm -r ghc-7.8.3-arm @@ -46,8 +38,6 @@ find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i ' # Fix the settings file to point to the right scripts and clang versions sed -i '' 's|/usr/bin/gcc|i386-apple-darwin11-clang|g' settings sed -i '' 's|/usr/bin/ld|i386-apple-darwin11-ld|g' settings -sed -i '' 's|"opt"|"/usr/local/clang-3.0/bin/opt"|g' settings -sed -i '' 's|"llc"|"/usr/local/clang-3.0/bin/llc"|g' settings make install cd .. rm -r ghc-7.8.3-i386 From f223e2154d89a162668088e75963bd32f3fd02bf Mon Sep 17 00:00:00 2001 From: Chris Kilding Date: Fri, 15 May 2015 09:51:49 +0100 Subject: [PATCH 41/45] Get i386-apple-darwin11-ld closer to upstream master --- i386-apple-darwin11-ld | 2 -- 1 file changed, 2 deletions(-) diff --git a/i386-apple-darwin11-ld b/i386-apple-darwin11-ld index 3d3d7a7..d97150d 100755 --- a/i386-apple-darwin11-ld +++ b/i386-apple-darwin11-ld @@ -2,8 +2,6 @@ TARGET_PLATFORM=`xcrun --show-sdk-platform-path --sdk iphonesimulator` TARGET_BIN=`xcrun --show-sdk-platform-path --sdk iphonesimulator`/Developer/usr/bin - -TARGET_LD=$TARGET_BIN/ld TARGET_LDFLAGS="-L$TARGET_PLATFORM/usr/lib/ -arch i386" TARGET_LD=$TARGET_BIN/ld From b3a39ec6bd90049a060bf84187ddc4f6eb2fa0b8 Mon Sep 17 00:00:00 2001 From: Chris Kilding Date: Fri, 15 May 2015 11:08:50 +0100 Subject: [PATCH 42/45] Another go with CFLAGS --- installGHCiOS.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/installGHCiOS.sh b/installGHCiOS.sh index 2258282..1dc6b5c 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -12,8 +12,13 @@ cd ghc-7.8.3-arm # Remove befuddling inclusion of my local paths LC_CTYPE=C LANG=C +CFLAGS="-mmacosx-version-min=10.9" +CXXFLAGS="-mmacosx-version-min=10.9" + find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i '' 's|/Users/lukexi/Code/ghc-ios-scripts/||g' +./configure --help + ./configure # Fix the settings file to point to the right scripts and clang versions sed -i '' 's|/usr/bin/gcc|arm-apple-darwin10-clang|g' settings From 515ccc1e27299ba87e03f1e525378bc64c21fd3e Mon Sep 17 00:00:00 2001 From: Chris Kilding Date: Fri, 15 May 2015 11:20:10 +0100 Subject: [PATCH 43/45] GHC ./configure looks for CPPFLAGS not CXXFLAGS --- installGHCiOS.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/installGHCiOS.sh b/installGHCiOS.sh index 1dc6b5c..38f56e7 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -14,6 +14,7 @@ LC_CTYPE=C LANG=C CFLAGS="-mmacosx-version-min=10.9" CXXFLAGS="-mmacosx-version-min=10.9" +CPPFLAGS="-mmacosx-version-min=10.9" find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i '' 's|/Users/lukexi/Code/ghc-ios-scripts/||g' From c1573f4736e874ca544017d7763bcf7fe9dd0a82 Mon Sep 17 00:00:00 2001 From: Chris Kilding Date: Fri, 15 May 2015 12:17:30 +0100 Subject: [PATCH 44/45] Try using vanilla GHC with custom ./configure args --- installGHCiOS.sh | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/installGHCiOS.sh b/installGHCiOS.sh index 38f56e7..b62b18e 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -4,10 +4,10 @@ cd /tmp echo "Downloading GHC for iOS devices..." -curl -L -O https://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-arm-apple-ios.tar.xz -tar xvf ghc-7.8.3-arm-apple-ios.tar.xz && mv ghc-7.8.3 ghc-7.8.3-arm -rm ghc-7.8.3-arm-apple-ios.tar.xz -cd ghc-7.8.3-arm +curl -L -O https://downloads.haskell.org/~ghc/7.10.1/ghc-7.10.1-src.tar.xz +tar xvf ghc-7.10.1-src.tar.xz && mv ghc-7.10.1 ghc-7.10.1-arm +rm ghc-7.10.1-src.tar.xz +cd ghc-7.10.1-arm # Remove befuddling inclusion of my local paths LC_CTYPE=C @@ -20,30 +20,10 @@ find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i ' ./configure --help -./configure +./configure --target=arm-apple-darwin10 --with-gcc=arm-apple-darwin10-clang # Fix the settings file to point to the right scripts and clang versions sed -i '' 's|/usr/bin/gcc|arm-apple-darwin10-clang|g' settings sed -i '' 's|/usr/bin/ld|arm-apple-darwin10-ld|g' settings make install cd .. -rm -r ghc-7.8.3-arm - -echo "Downloading GHC for the iOS simulator..." -cd /tmp -curl -L -O https://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-i386-apple-ios.tar.xz -tar xvf ghc-7.8.3-i386-apple-ios.tar.xz && mv ghc-7.8.3 ghc-7.8.3-i386 -rm ghc-7.8.3-i386-apple-ios.tar.xz -cd ghc-7.8.3-i386 - -# ditto above -LC_CTYPE=C -LANG=C -find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i '' 's|/Users/lukexi/Code/ghc-ios-scripts/||g' - -./configure -# Fix the settings file to point to the right scripts and clang versions -sed -i '' 's|/usr/bin/gcc|i386-apple-darwin11-clang|g' settings -sed -i '' 's|/usr/bin/ld|i386-apple-darwin11-ld|g' settings -make install -cd .. -rm -r ghc-7.8.3-i386 +rm -r ghc-7.10.1-arm From 130ce9d3c7453272e290b90ec61df4bb06538b8b Mon Sep 17 00:00:00 2001 From: Chris Kilding Date: Fri, 15 May 2015 15:15:17 +0100 Subject: [PATCH 45/45] Enable + tweat build.mk file in vanilla GHC build --- installGHCiOS.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/installGHCiOS.sh b/installGHCiOS.sh index b62b18e..2e71220 100755 --- a/installGHCiOS.sh +++ b/installGHCiOS.sh @@ -18,6 +18,17 @@ CPPFLAGS="-mmacosx-version-min=10.9" find . -type f -not -name .DS_Store -not -name "*.a" -print0 | xargs -0 sed -i '' 's|/Users/lukexi/Code/ghc-ios-scripts/||g' +# Enable the build.mk file (essential for telling vanilla GHC to target iOS) +mv mk/build.mk.sample mk/build.mk +# Select a cross-compiling build flavour +sed -i '' 's/#BuildFlavour = quick-cross/BuildFlavour = quick-cross/g' mk/build.mk +# TODO should we force LLVM backend on GHC stage1 too? +# sed -i '' 's/GhcStage1HcOpts = -O/GhcStage1HcOpts = -O -fllvm/g' mk/build.mk + +echo "Contents of mk/build.mk:" +cat mk/build.mk + +echo "Arguments for the configure script are:" ./configure --help ./configure --target=arm-apple-darwin10 --with-gcc=arm-apple-darwin10-clang