diff options
author | Vidar Holen <vidar@vidarholen.net> | 2023-02-04 19:55:25 -0800 |
---|---|---|
committer | Vidar Holen <vidar@vidarholen.net> | 2023-02-04 19:55:25 -0800 |
commit | b1ca3929e387446f3e3db023d716cf3787370437 (patch) | |
tree | 6780a4506ca9aa8d50463c67e3c076b3a3a91738 | |
parent | c05380d518056189412e12128a8906b8ca6f6717 (diff) |
Upgrade cross-compilers to 9.2.5 to handle hashable-1.4.2.0
-rw-r--r-- | build/darwin.x86_64/Dockerfile | 11 | ||||
-rw-r--r-- | build/linux.aarch64/Dockerfile | 14 |
2 files changed, 17 insertions, 8 deletions
diff --git a/build/darwin.x86_64/Dockerfile b/build/darwin.x86_64/Dockerfile index 9e33a82..a53245f 100644 --- a/build/darwin.x86_64/Dockerfile +++ b/build/darwin.x86_64/Dockerfile @@ -6,15 +6,18 @@ ENV TARGETNAME darwin.x86_64 # Build dependencies USER root ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get install -y ghc automake autoconf llvm curl +RUN sed -e 's/focal/kinetic/g' -i /etc/apt/sources.list +RUN apt-get update +RUN apt-get dist-upgrade -y +RUN apt-get install -y ghc automake autoconf llvm curl alex happy # Build GHC WORKDIR /ghc -RUN curl -L "https://downloads.haskell.org/~ghc/8.10.4/ghc-8.10.4-src.tar.xz" | tar xJ --strip-components=1 -RUN ./boot && ./configure --host x86_64-linux-gnu --build x86_64-linux-gnu --target "$TARGET" +RUN curl -L "https://downloads.haskell.org/~ghc/9.2.5/ghc-9.2.5-src.tar.xz" | tar xJ --strip-components=1 +RUN ./configure --host x86_64-linux-gnu --build x86_64-linux-gnu --target "$TARGET" RUN cp mk/flavours/quick-cross.mk mk/build.mk && make -j "$(nproc)" RUN make install -RUN curl -L "https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz" | tar xJv -C /usr/local/bin +RUN curl -L "https://downloads.haskell.org/~cabal/cabal-install-3.9.0.0/cabal-install-3.9-x86_64-linux-alpine.tar.xz" | tar xJv -C /usr/local/bin # Due to an apparent cabal bug, we specify our options directly to cabal # It won't reuse caches if ghc-options are specified in ~/.cabal/config diff --git a/build/linux.aarch64/Dockerfile b/build/linux.aarch64/Dockerfile index 60537b3..d5320e9 100644 --- a/build/linux.aarch64/Dockerfile +++ b/build/linux.aarch64/Dockerfile @@ -6,19 +6,25 @@ ENV TARGETNAME linux.aarch64 # Build dependencies USER root ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get install -y ghc automake autoconf build-essential llvm curl qemu-user-static gcc-$TARGET + +# These deps are from 20.04, because GHC's compiler/llvm support moves slowly +RUN apt-get update && apt-get install -y llvm gcc-$TARGET + +# The rest are from 22.10 +RUN sed -e 's/focal/kinetic/g' -i /etc/apt/sources.list +RUN apt-get update && apt-get install -y ghc alex happy automake autoconf build-essential curl qemu-user-static # Build GHC WORKDIR /ghc -RUN curl -L "https://downloads.haskell.org/~ghc/8.10.4/ghc-8.10.4-src.tar.xz" | tar xJ --strip-components=1 +RUN curl -L "https://downloads.haskell.org/~ghc/9.2.5/ghc-9.2.5-src.tar.xz" | tar xJ --strip-components=1 RUN ./boot && ./configure --host x86_64-linux-gnu --build x86_64-linux-gnu --target "$TARGET" RUN cp mk/flavours/quick-cross.mk mk/build.mk && make -j "$(nproc)" RUN make install -RUN curl -L "https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz" | tar xJv -C /usr/local/bin +RUN curl -L "https://downloads.haskell.org/~cabal/cabal-install-3.9.0.0/cabal-install-3.9-x86_64-linux-alpine.tar.xz" | tar xJv -C /usr/local/bin # Due to an apparent cabal bug, we specify our options directly to cabal # It won't reuse caches if ghc-options are specified in ~/.cabal/config -ENV CABALOPTS "--ghc-options;-split-sections -optc-Os -optc-Wl,--gc-sections;--with-ghc=$TARGET-ghc;--with-hc-pkg=$TARGET-ghc-pkg" +ENV CABALOPTS "--ghc-options;-split-sections -optc-Os -optc-Wl,--gc-sections -optc-fPIC;--with-ghc=$TARGET-ghc;--with-hc-pkg=$TARGET-ghc-pkg" # Prebuild the dependencies RUN cabal update && IFS=';' && cabal install --dependencies-only $CABALOPTS ShellCheck |