Commit cab80b7f authored by Ryan Scott's avatar Ryan Scott Committed by Ben Gamari

aarch64-linux-deb9, armv7-linux-deb9, x86_64-linux-deb9: Reorganize LLVM treatment

parent ecb41240
...@@ -16,31 +16,33 @@ RUN apt-get update \ ...@@ -16,31 +16,33 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Boot LLVM # Boot LLVM
ENV BOOT_LLVM_DIR /opt/llvm-bootstrap
ENV BOOT_LLVM_VERSION 7.0.0
ENV PATH /usr/local/bin:$PATH ENV PATH /usr/local/bin:$PATH
ENV LLVM_TARBALL http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-aarch64-linux-gnu.tar.xz RUN curl http://releases.llvm.org/$BOOT_LLVM_VERSION/clang+llvm-$BOOT_LLVM_VERSION-aarch64-linux-gnu.tar.xz | tar -xJC . && \
RUN curl $LLVM_TARBALL | tar -xJC . && \ mkdir $BOOT_LLVM_DIR && \
mkdir /opt/llvm6 && \ cp -R clang+llvm*/* $BOOT_LLVM_DIR && \
cp -R clang+llvm*/* /opt/llvm6 && \
rm -R clang+llvm* && \ rm -R clang+llvm* && \
/opt/llvm6/bin/llc --version $BOOT_LLVM_DIR/bin/llc --version
# GHC # GHC
# Use 8.8.1 to bootstrap, since earlier releases are especially buggy on AArch64 # Use 8.8.1 to bootstrap, since earlier releases are especially buggy on AArch64
ENV GHC_VERSION 8.8.1 ENV GHC_VERSION 8.8.1
RUN curl http://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-aarch64-deb9-linux.tar.xz | tar -xJ RUN curl http://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-aarch64-deb9-linux.tar.xz | tar -xJ
WORKDIR /ghc-$GHC_VERSION WORKDIR /ghc-$GHC_VERSION
RUN ./configure --prefix=/usr/local LLC=/opt/llvm6/bin/llc OPT=/opt/llvm6/bin/opt && \ RUN ./configure --prefix=/usr/local LLC=$BOOT_LLVM_DIR/bin/llc OPT=$BOOT_LLVM_DIR/bin/opt && \
make install make install
WORKDIR / WORKDIR /
RUN rm -Rf ghc-* RUN rm -Rf ghc-*
RUN ghc --version RUN ghc --version
# LLVM # LLVM
ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-aarch64-linux-gnu.tar.xz ENV LLVM_DIR /opt/llvm
ENV PATH /opt/llvm7/bin:$PATH ENV LLVM_VERSION 7.0.0
RUN curl $LLVM_TARBALL | tar -xJC . && \ ENV PATH $LLVM_DIR/bin:$PATH
mkdir /opt/llvm7 && \ RUN curl http://releases.llvm.org/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-aarch64-linux-gnu.tar.xz | tar -xJC . && \
cp -R clang+llvm*/* /opt/llvm7 && \ mkdir $LLVM_DIR && \
cp -R clang+llvm*/* $LLVM_DIR && \
rm -R clang+llvm* && \ rm -R clang+llvm* && \
llc --version llc --version
......
...@@ -17,31 +17,33 @@ RUN apt-get update \ ...@@ -17,31 +17,33 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Boot LLVM # Boot LLVM
ENV BOOT_LLVM_DIR /opt/llvm-bootstrap
ENV BOOT_LLVM_VERSION 7.0.0
ENV PATH /usr/local/bin:$PATH ENV PATH /usr/local/bin:$PATH
ENV LLVM_TARBALL http://releases.llvm.org/5.0.1/clang+llvm-5.0.1-armv7a-linux-gnueabihf.tar.xz RUN curl http://releases.llvm.org/$BOOT_LLVM_VERSION/clang+llvm-$BOOT_LLVM_VERSION-armv7a-linux-gnueabihf.tar.xz | tar -xJC . && \
RUN curl $LLVM_TARBALL | tar -xJC . && \ mkdir $BOOT_LLVM_DIR && \
mkdir /opt/llvm5 && \ cp -R clang+llvm*/* $BOOT_LLVM_DIR && \
cp -R clang+llvm*/* /opt/llvm5 && \
rm -R clang+llvm* && \ rm -R clang+llvm* && \
/opt/llvm5/bin/llc --version $BOOT_LLVM_DIR/bin/llc --version
# GHC # GHC
# Use 8.8.1 to bootstrap, since earlier releases are especially buggy on AArch64 # Use 8.8.1 to bootstrap, since earlier releases are especially buggy on AArch64
ENV GHC_VERSION 8.8.1 ENV GHC_VERSION 8.8.1
RUN curl http://home.smart-cactus.org/~ben/ghc/ghc-$GHC_VERSION-arm-unknown-linux.tar.xz | tar -xJ RUN curl http://home.smart-cactus.org/~ben/ghc/ghc-$GHC_VERSION-arm-unknown-linux.tar.xz | tar -xJ
WORKDIR /ghc-$GHC_VERSION WORKDIR /ghc-$GHC_VERSION
RUN ./configure --prefix=/usr/local LLC=/opt/llvm5/bin/llc OPT=/opt/llvm5/bin/opt && \ RUN ./configure --prefix=/usr/local LLC=$BOOT_LLVM_DIR/bin/llc OPT=$BOOT_LLVM_DIR/bin/opt && \
make install make install
WORKDIR / WORKDIR /
RUN rm -Rf ghc-* RUN rm -Rf ghc-*
RUN ghc --version RUN ghc --version
# LLVM # LLVM
ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-armv7a-linux-gnueabihf.tar.xz ENV LLVM_DIR /opt/llvm
ENV PATH /opt/llvm7/bin:$PATH ENV LLVM_VERSION 7.0.0
RUN curl $LLVM_TARBALL | tar -xJC . && \ ENV PATH $LLVM_DIR/bin:$PATH
mkdir /opt/llvm7 && \ RUN curl http://releases.llvm.org/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-armv7a-linux-gnueabihf.tar.xz | tar -xJC . && \
cp -R clang+llvm*/* /opt/llvm7 && \ mkdir $LLVM_DIR && \
cp -R clang+llvm*/* $LLVM_DIR && \
rm -R clang+llvm* && \ rm -R clang+llvm* && \
llc --version llc --version
......
...@@ -48,12 +48,13 @@ RUN curl https://downloads.haskell.org/cabal/cabal-install-$CABAL_VERSION/cabal- ...@@ -48,12 +48,13 @@ RUN curl https://downloads.haskell.org/cabal/cabal-install-$CABAL_VERSION/cabal-
mv cabal /usr/local/bin/cabal mv cabal /usr/local/bin/cabal
# LLVM # LLVM
ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz ENV LLVM_DIR /opt/llvm
ENV PATH /opt/llvm/bin:$PATH ENV LLVM_VERSION 7.0.0
RUN curl $LLVM_TARBALL | tar -xJC .; \ ENV PATH $LLVM_DIR/bin:$PATH
mkdir /opt/llvm; \ RUN curl http://releases.llvm.org/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-x86_64-linux-gnu-ubuntu-16.04.tar.xz | tar -xJC .; \
cp -R clang+llvm*/* /opt/llvm; \ mkdir $LLVM_DIR && \
rm -R clang+llvm*; \ cp -R clang+llvm*/* $LLVM_DIR && \
rm -R clang+llvm* && \
llc --version llc --version
# Create a normal user. # Create a normal user.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment