Skip to content

Commit 9209cae

Browse files
committed
Add musl.cc cross-compiler toolchains
1 parent 80b65fd commit 9209cae

7 files changed

Lines changed: 97 additions & 0 deletions

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Git LFS configuration for large binary files
2+
# Cross-compiler toolchains (stored with Git LFS)
3+
cross-compilers/*.tgz filter=lfs diff=lfs merge=lfs -text

cross-compilers/.gitkeep

Whitespace-only changes.

cross-compilers/README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Cross-Compiler Toolchains
2+
3+
This directory contains pre-built cross-compiler toolchains from [musl.cc](https://musl.cc/).
4+
5+
## Files
6+
7+
These files are stored with Git LFS (Large File Storage) and are downloaded via GitHub Actions CI/CD:
8+
9+
- `arm-linux-musleabihf-cross.tgz` - ARM 32-bit (ARMv7) EABI Hard Float
10+
- `riscv64-linux-musl-cross.tgz` - RISC-V 64-bit
11+
- `s390x-linux-musl-cross.tgz` - IBM System z (s390x)
12+
- `powerpc64le-linux-musl-cross.tgz` - PowerPC 64-bit Little Endian
13+
14+
## Downloading Toolchains Locally
15+
16+
To download these toolchains to your local machine:
17+
18+
1. **Install Git LFS** (if not already installed):
19+
```bash
20+
# macOS
21+
brew install git-lfs
22+
23+
# Ubuntu/Debian
24+
sudo apt-get install git-lfs
25+
26+
# Other systems: https://git-lfs.com/
27+
```
28+
29+
2. **Initialize Git LFS in this repository** (one-time setup):
30+
```bash
31+
git lfs install
32+
```
33+
34+
3. **Run the download script**:
35+
```bash
36+
./scripts/download-musl-cc.sh
37+
```
38+
39+
This script will:
40+
- Create this directory if it doesn't exist
41+
- Download all four cross-compiler toolchains
42+
- Retry up to 3 times if downloads fail
43+
- Store them for Git LFS tracking
44+
45+
4. **Commit and push to GitHub**:
46+
```bash
47+
git add cross-compilers/ .gitattributes
48+
git commit -m "Add musl.cc cross-compiler toolchains"
49+
git push
50+
```
51+
52+
## Git LFS Tracking
53+
54+
These files are tracked with Git LFS, which means:
55+
56+
- Git stores pointers to the actual files instead of the full archives
57+
- The repository size remains small
58+
- When you clone or pull, Git LFS downloads only the files you need
59+
- Bandwidth usage is optimized for large binary files
60+
61+
To verify Git LFS is working correctly, check the `.gitattributes` file to see which patterns are tracked.
62+
63+
## Why These Toolchains?
64+
65+
The musl.cc project provides pre-built, statically-linked cross-compiler toolchains. They're:
66+
- Ready to use without system dependencies
67+
- Statically compiled (portable across Linux distributions)
68+
- Designed for cross-compilation to various architectures
69+
- Updated regularly with latest compiler versions
70+
71+
## Updates
72+
73+
To update these toolchains to newer versions in the future:
74+
75+
1. Run the download script again: `./scripts/download-musl-cc.sh`
76+
2. Git will detect changes if new versions are available
77+
3. Commit and push the updated files
78+
79+
## References
80+
81+
- [musl.cc](https://musl.cc/) - Pre-built musl libc cross-compiler toolchains
82+
- [Git LFS Documentation](https://git-lfs.com/)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:11e155a090789c854afb5d91e57c81f441ccdb92f7f277789c3a6d5884a68e58
3+
size 102391022
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:688dea3950d9139c761b6d68053b35101308da37f950bbb0abe1d53a0cc1717d
3+
size 107101732
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:db0bc413bd4a93f2012cc74b9ba0c4af29d8bc18b88e9c61998738ccb918604b
3+
size 108069067
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:d21e0eda59c25d9ef4b7f477f773aa928fe38b2b6f28ee643c52d33a1597e838
3+
size 100597838

0 commit comments

Comments
 (0)