@@ -6,19 +6,25 @@ ENV TARGETNAME linux.aarch64
6
6
# Build dependencies
7
7
USER root
8
8
ENV DEBIAN_FRONTEND noninteractive
9
- RUN apt-get update && apt-get install -y ghc automake autoconf build-essential llvm curl qemu-user-static gcc-$TARGET
9
+
10
+ # These deps are from 20.04, because GHC's compiler/llvm support moves slowly
11
+ RUN apt-get update && apt-get install -y llvm gcc-$TARGET
12
+
13
+ # The rest are from 22.10
14
+ RUN sed -e 's/focal/kinetic/g' -i /etc/apt/sources.list
15
+ RUN apt-get update && apt-get install -y ghc alex happy automake autoconf build-essential curl qemu-user-static
10
16
11
17
# Build GHC
12
18
WORKDIR /ghc
13
- RUN curl -L "https://downloads.haskell.org/~ghc/8.10.4 /ghc-8.10.4 -src.tar.xz" | tar xJ --strip-components=1
19
+ RUN curl -L "https://downloads.haskell.org/~ghc/9.2.5 /ghc-9.2.5 -src.tar.xz" | tar xJ --strip-components=1
14
20
RUN ./boot && ./configure --host x86_64-linux-gnu --build x86_64-linux-gnu --target "$TARGET"
15
21
RUN cp mk/flavours/quick-cross.mk mk/build.mk && make -j "$(nproc)"
16
22
RUN make install
17
- 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
23
+ 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
18
24
19
25
# Due to an apparent cabal bug, we specify our options directly to cabal
20
26
# It won't reuse caches if ghc-options are specified in ~/.cabal/config
21
- ENV CABALOPTS "--ghc-options;-split-sections -optc-Os -optc-Wl,--gc-sections;--with-ghc=$TARGET-ghc;--with-hc-pkg=$TARGET-ghc-pkg"
27
+ ENV CABALOPTS "--ghc-options;-split-sections -optc-Os -optc-Wl,--gc-sections -optc-fPIC ;--with-ghc=$TARGET-ghc;--with-hc-pkg=$TARGET-ghc-pkg"
22
28
23
29
# Prebuild the dependencies
24
30
RUN cabal update && IFS=';' && cabal install --dependencies-only $CABALOPTS ShellCheck
0 commit comments