-
-
Save petekneller/86d35c93a80da1fdc18f9966d64cb8f6 to your computer and use it in GitHub Desktop.
A scrip to install Haskell Stack and set up things properly on Raspbian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install stack | |
curl -sSL https://get.haskellstack.org/ | sh | |
# Install LLVM | |
sudo apt-get install llvm-3.7 | |
# Add symbolic links to opt and llc | |
ln -s /usr/bin/opt-3.7 /usr/bin/opt | |
ln -s /usr/bin/llc-3.7 /usr/bin/llc | |
# Remove the symbolic link to ghc | |
rm ~/.stack/programs/arm-linux/ghc-8.0.1/bin/ghc | |
# Wrap ghc binary in a shell script | |
cat > ~/.stack/programs/arm-linux/ghc-8.0.1/bin/ghc-arm-wrapper.sh << 'END' | |
#!/bin/sh | |
ghc-8.0.1 -opta-march=armv7-a $@ | |
END | |
# Create new symbolic link to ghc | |
ln ~/.stack/programs/arm-linux/ghc-8.0.1/bin/ghc-arm-wrapper.sh ~/.stack/programs/arm-linux/ghc-8.0.1/bin/ghc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment