Skip to content

Commit f2caeb4

Browse files
Add musl libc submodule
Since musl is already incorporated into the build system (see for example configure.ac, Makefile.in), this patch adds a submodule for musl based on the current v1.2.2 release. The GitHub Actions configurations have also been updated to include the musl based toolchain. Signed-off-by: Florian Hofhammer <florian.hofhammer@fhofhammer.de>
1 parent 7c07a87 commit f2caeb4

File tree

6 files changed

+25
-6
lines changed

6 files changed

+25
-6
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-18.04, ubuntu-20.04]
17-
mode: [newlib, linux]
17+
mode: [newlib, linux, musl]
1818
target: [rv32gc-ilp32d, rv64gc-lp64d]
1919
steps:
2020
- uses: actions/checkout@v2
@@ -40,7 +40,14 @@ jobs:
4040
id: toolchain-name-generator
4141
run: |
4242
if [[ "${{ matrix.target }}" == *"32"* ]]; then BITS=32; else BITS=64; fi
43-
if [[ "${{ matrix.mode }}" == "linux" ]]; then MODE="glibc"; else MODE="elf"; fi
43+
case "${{ matrix.mode }}" in
44+
"linux")
45+
MODE="glibc";;
46+
"musl")
47+
MODE="musl";;
48+
*)
49+
MODE="elf";;
50+
esac
4451
echo ::set-output name=TOOLCHAIN_NAME::riscv$BITS-$MODE-${{ matrix.os }}-nightly
4552
4653
- uses: actions/upload-artifact@v2

.github/workflows/nightly-release.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
strategy:
5050
matrix:
5151
os: [ubuntu-18.04, ubuntu-20.04]
52-
mode: [newlib, linux]
52+
mode: [newlib, linux, musl]
5353
target: [rv32gc-ilp32d, rv64gc-lp64d]
5454
steps:
5555
- uses: actions/checkout@v2
@@ -75,7 +75,14 @@ jobs:
7575
id: toolchain-name-generator
7676
run: |
7777
if [[ "${{ matrix.target }}" == *"32"* ]]; then BITS=32; else BITS=64; fi
78-
if [[ "${{ matrix.mode }}" == "linux" ]]; then MODE="glibc"; else MODE="elf"; fi
78+
case "${{ matrix.mode }}" in
79+
"linux")
80+
MODE="glibc";;
81+
"musl")
82+
MODE="musl";;
83+
*)
84+
MODE="elf";;
85+
esac
7986
echo ::set-output name=TOOLCHAIN_NAME::riscv$BITS-$MODE-${{ matrix.os }}-nightly
8087
8188
- uses: actions/upload-artifact@v2

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@
2424
[submodule "qemu"]
2525
path = qemu
2626
url = https://git.qemu.org/git/qemu.git
27+
[submodule "musl"]
28+
path = musl
29+
url = git://git.musl-libc.org/musl
30+
branch = master

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3596,7 +3596,7 @@ fi
35963596
with_musl_src=$with_musl_src
35973597
35983598
else
3599-
with_musl_src="\$(srcdir)/riscv-musl"
3599+
with_musl_src="\$(srcdir)/musl"
36003600
36013601
fi
36023602

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ AX_ARG_WITH_SRC(gcc, riscv-gcc)
219219
AX_ARG_WITH_SRC(binutils, riscv-binutils)
220220
AX_ARG_WITH_SRC(newlib, newlib)
221221
AX_ARG_WITH_SRC(glibc, glibc)
222-
AX_ARG_WITH_SRC(musl, riscv-musl)
222+
AX_ARG_WITH_SRC(musl, musl)
223223
AX_ARG_WITH_SRC(gdb, riscv-gdb)
224224
AX_ARG_WITH_SRC(qemu, qemu)
225225

musl

Submodule musl added at 85e0e35

0 commit comments

Comments
 (0)