Skip to content
Snippets Groups Projects
Verified Commit 1a2460a2 authored by Olivier Benz's avatar Olivier Benz
Browse files

Update tweaks to build linux/riscv64 images

parent 0ed277ac
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,9 @@ Topmost entry = Tag `latest` ...@@ -52,6 +52,9 @@ Topmost entry = Tag `latest`
* Images based on Alpine 3.{17,18}: Package pkgconf downgraded to v1.8.1 * Images based on Alpine 3.{17,18}: Package pkgconf downgraded to v1.8.1
* Due to <https://github.com/haskell/cabal/issues/8923> * Due to <https://github.com/haskell/cabal/issues/8923>
* `linux/riscv64` image for GHC version 9.12.1 built with
`--flavour="quick+llvm`
* Due to <https://gitlab.haskell.org/ghc/ghc/-/issues/25594>
## Experimental ## Experimental
......
...@@ -48,6 +48,9 @@ RUN cd /tmp \ ...@@ -48,6 +48,9 @@ RUN cd /tmp \
&& tar -xJf "ghc-$GHC_VERSION-src.tar.xz" \ && tar -xJf "ghc-$GHC_VERSION-src.tar.xz" \
&& cd "ghc-$GHC_VERSION" \ && cd "ghc-$GHC_VERSION" \
## Configure and build ## Configure and build
&& if [ "$(uname -m)" = "riscv64" ]; then \
flavour="quick+llvm"; \
fi \
&& ./boot.source \ && ./boot.source \
&& ./configure \ && ./configure \
--build=$(uname -m)-alpine-linux \ --build=$(uname -m)-alpine-linux \
...@@ -64,7 +67,7 @@ RUN cd /tmp \ ...@@ -64,7 +67,7 @@ RUN cd /tmp \
&& export PATH=/root/.local/bin:$PATH \ && export PATH=/root/.local/bin:$PATH \
## See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command ## See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command
&& hadrian/build binary-dist -j"$(($(nproc)+1))" \ && hadrian/build binary-dist -j"$(($(nproc)+1))" \
--flavour=perf+llvm+split_sections \ --flavour=${flavour:-perf+llvm+split_sections} \
--docs=none --docs=none
FROM bootstrap AS bootstrap-cabal FROM bootstrap AS bootstrap-cabal
......
...@@ -59,9 +59,9 @@ RUN cd /tmp \ ...@@ -59,9 +59,9 @@ RUN cd /tmp \
&& mv "/tmp/$GHC_VERSION.patch" . \ && mv "/tmp/$GHC_VERSION.patch" . \
&& patch -p0 <"$GHC_VERSION.patch" \ && patch -p0 <"$GHC_VERSION.patch" \
## Configure and build ## Configure and build
&& case "$(uname -m)" in \ && if [ "$(uname -m)" = "riscv64" ]; then \
riscv64) numa="no" ;; \ numa="no"; \
esac \ fi \
&& ./boot.source \ && ./boot.source \
&& ./configure \ && ./configure \
--build=$(uname -m)-alpine-linux \ --build=$(uname -m)-alpine-linux \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment