Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GHC musl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
GHC musl
Commits
560be80c
Verified
Commit
560be80c
authored
4 months ago
by
Olivier Benz
Browse files
Options
Downloads
Patches
Plain Diff
Update tweaks to build linux/riscv64 images
parent
5f3b66e0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
latest.Dockerfile
+15
-3
15 additions, 3 deletions
latest.Dockerfile
with
15 additions
and
3 deletions
latest.Dockerfile
+
15
−
3
View file @
560be80c
...
@@ -8,14 +8,19 @@ ARG CABAL_VERSION_BUILD=${CABAL_VERSION}
...
@@ -8,14 +8,19 @@ ARG CABAL_VERSION_BUILD=${CABAL_VERSION}
FROM
glcr.b-data.ch/ghc/ghc-musl:9.8.2-linux-amd64
AS
bootstrap-amd64
FROM
glcr.b-data.ch/ghc/ghc-musl:9.8.2-linux-amd64
AS
bootstrap-amd64
FROM
glcr.b-data.ch/ghc/ghc-musl:9.8.2-linux-arm64v8
AS
bootstrap-arm64
FROM
glcr.b-data.ch/ghc/ghc-musl:9.8.2-linux-arm64v8
AS
bootstrap-arm64
FROM
glcr.b-data.ch/ghc/ghc-musl:9.8.2-linux-riscv64
AS
bootstrap-riscv64
FROM
glcr.b-data.ch/ghc/ghc-musl:9.8.2-linux-riscv64
AS
bootstrap-riscv64
## linux/riscv64 bootstrap image: binutils-gold n/a; numactl-dev pre-installed
FROM
bootstrap-${TARGETARCH}${TARGETVARIANT}
AS
bootstrap
FROM
bootstrap-${TARGETARCH}${TARGETVARIANT}
AS
bootstrap
RUN
apk upgrade
--no-cache
\
RUN case
"
$(
uname
-m
)
"
in
\
x86_64
)
linker
=
"gold"
;;
\
aarch64
)
linker
=
"gold"
;;
\
esac
\
&&
apk upgrade
--no-cache
\
&&
apk add
--no-cache
\
&&
apk add
--no-cache
\
autoconf
\
autoconf
\
automake
\
automake
\
binutils
-gold
\
binutils
${
linker
:+-
}${
linker
}
\
build-base
\
build-base
\
clang18
\
clang18
\
coreutils
\
coreutils
\
...
@@ -54,11 +59,15 @@ RUN cd /tmp \
...
@@ -54,11 +59,15 @@ 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 \
riscv64) numa="no" ;; \
esac \
&& ./boot.source \
&& ./boot.source \
&& ./configure \
&& ./configure \
--build=$(uname -m)-alpine-linux \
--build=$(uname -m)-alpine-linux \
--host=$(uname -m)-alpine-linux \
--host=$(uname -m)-alpine-linux \
--target=$(uname -m)-alpine-linux \
--target=$(uname -m)-alpine-linux \
--enable-numa=${numa:-auto} \
## Use the LLVM backend
## Use the LLVM backend
## Switch llvm-targets from unknown-linux-gnueabihf->alpine-linux
## Switch llvm-targets from unknown-linux-gnueabihf->alpine-linux
## so we can match the llvm vendor string alpine uses
## so we can match the llvm vendor string alpine uses
...
@@ -170,7 +179,10 @@ FROM ghc-stage1 AS ghc-stage2
...
@@ -170,7 +179,10 @@ FROM ghc-stage1 AS ghc-stage2
COPY
--from=bootstrap-cabal /root/.local/bin/cabal /usr/local/bin/cabal
COPY
--from=bootstrap-cabal /root/.local/bin/cabal /usr/local/bin/cabal
## Rebuild Cabal (the tool) with the GHC target version
## Rebuild Cabal (the tool) with the GHC target version
RUN
cabal update
\
RUN if
[
"
$(
uname
-m
)
"
=
"riscv64"
]
;
then
\
apk add
--no-cache
numactl-dev
;
\
fi
\
&&
cabal update
\
&&
cabal
install
"cabal-install-
$CABAL_VERSION
"
&&
cabal
install
"cabal-install-
$CABAL_VERSION
"
FROM
ghc-stage1
AS
test
FROM
ghc-stage1
AS
test
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment