You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/readme.md
+34-49Lines changed: 34 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,58 +1,54 @@
1
-
# GNU / musl compilers by Dyne.org
1
+
# 💪 GNU / musl compilers by Dyne.org
2
2
3
3
## Introduction
4
4
5
-
This is a pre-built cross-compilation toolchain that combine the GNU
6
-
compiler collection (GCC with Binutils, GMP, MPC and MPFR) with the
7
-
musl C library. Pronounced "muscl", our C/C++ compiler packages are
8
-
optimized to be small in size and produce static binaries,
9
-
redistributed by the Dyne.org foundation.
5
+
This is a **fully static**, pre-built cross-compilation toolchain for x86_64 Linux hosts (any, including WSL2 and Alpine) that combines the GNU compiler collection (GCC with Binutils, GMP, MPC and MPFR) with the musl C library (pronounced "muscle").
10
6
11
-
Our goal is to provide x86 64-bit Linux hosts (including WSL2) with
12
-
ready to use cross-compilers that build static binaries for different
13
-
architectures without installing additional system packages or
14
-
fighting with distribution-specific patches.
7
+
Our C/C++ toolchain is optimized to be small in size, produce static binaries, and **support the latest C++20 standard** and be updated for future versions.
8
+
9
+
We enable bare-metal as well virtualized **builds of static binaries that run everywhere**, without installing additional system packages, chroots, docker images, qemu or dealing with distribution-specific patches.
15
10
16
11
## Usage
17
12
18
-
The hard-coded absolute path this toolchain resides is: `/opt/musl-dyne`
13
+
The hard-coded absolute path this toolchain resides is: `/opt/dyne/gcc-musl`
19
14
20
-
One should therefore include `/opt/musl-dyne/bin` in $PATH:
15
+
One should therefore include `/opt/dyne/gcc-musl/bin` in $PATH:
21
16
```sh
22
-
export PATH=/opt/musl-dyne/bin:$PATH
17
+
export PATH=/opt/dyne/gcc-musl/bin:$PATH
23
18
```
24
19
25
20
Look inside the bin directory for the list of executable compiler
26
-
tools and setup `CC`, `CXX` and `LD` flags accordingly for each build
27
-
system used by your projects.
21
+
tools and setup `CC`, `CXX`, `LD` and `AR` flags accordingly for each build system used by your projects.
28
22
29
-
## Source components
23
+
We also ship base libraries commonly used in C/C++ applications: **libreSSL, ZLib-ng, libSSH2 and libCURL**, as well ccache to speed compilation. There are found in `/opt/dyne/$ARCH` where `$ARCH` is the targetes architecture that must be installed. Multiple target architectures can be installed and coexist in `/opt/dyne`.
30
24
31
-
All sources are mirrored on [files.dyne.org](https://files.dyne.org/musl?dir=musl/sources)
25
+
### Easy use in CMake
32
26
33
-
The latest build is made with:
27
+
If you are using `cmake` for your builds then use our toolchain file:
Make sure to config `-DARCH=""` to your target architecture, here a list of all configurable options and their defaults:
32
+
```cmake
33
+
# Configurable settings
34
+
set(ARCH "x86_64-linux-musl" CACHE STRING "Target architecture to (cross)compile")
35
+
set(CMAKE_CXX_FLAGS "-static --static -g0 -Os -fstack-protector-all -D_FORTIFY_SOURCE=2 -fno-strict-overflow" CACHE STRING "C++ Compilation flags, default set for small and secure binaries")
36
+
set(CMAKE_C_FLAGS "-static --static -g0 -Os -fstack-protector-all -D_FORTIFY_SOURCE=2 -fno-strict-overflow" CACHE STRING "C Compilation flags, default set for small and secure binaries")
37
+
set(ROOT "/opt" CACHE STRING "Base root prefix for installation (often referred as PREFIX or DESTDIR)")
38
+
option(CCACHE "Use ccache to speed up compilation" 1)
39
+
option(FOR_MUSL_DYNE "Install target will copy everything inside /opt/musl-dyne" 0)
40
+
option(FORCE_STATIC "Force linker flags to build static executables (may fix or break some cases)" 0)
41
+
```
34
42
35
-
- binutils-2.44.tar.gz
36
-
- gcc-15.1.0.tar.xz
37
-
- gmp-6.1.2.tar.bz2
38
-
- linux-5.8.5.tar.xz
39
-
- mpc-1.1.0.tar.gz
40
-
- mpfr-4.0.2.tar.bz2
41
-
- musl-1.2.5.tar.gz
43
+
## Source components
42
44
43
-
plus additional base libs and utils:
45
+
All sources are mirrored on [files.dyne.org](https://files.dyne.org/musl?dir=musl/sources)
44
46
45
-
- libressl-4.1.0
46
-
- zlib-ng-2.2.4
47
-
- curl-8.15.0
48
-
- libssh2-1.11.1
49
-
- ccache-4.11.3
47
+
The latest build includes the following source components: `binutils-2.44.tar.gz`, `gcc-15.1.0.tar.xz`, `gmp-6.1.2.tar.bz2`, `linux-5.8.5.tar.xz`, `mpc-1.1.0.tar.gz`, `mpfr-4.0.2.tar.bz2`, and `musl-1.2.5.tar.gz`.
--disable-libsanitizer`. Features enabled: decimal-float, fixed-point,
53
-
quadmath and lto, as well libitm to satisfy advanced C++ requirements.
54
-
Debugging functions are omitted.
49
+
Additional base libraries and utilities provided are `libressl-4.1.0`, `zlib-ng-2.2.4`, `curl-8.15.0`, `libssh2-1.11.1`, and `ccache-4.11.3`.
55
50
51
+
Build flags used: `--disable-nls --disable-libmudflap --disable-libsanitizer --disable-lto`. Features enabled: decimal-float, fixed-point, quadmath, as well libitm to satisfy advanced C++ requirements. Debugging functions are omitted.
56
52
57
53
58
54
Builds are fully automated over CI and use semantic versioning that is
@@ -70,20 +66,9 @@ following architectures:
70
66
| ARM HF 32-bit | arm_hf |`arm-linux-musleabihf`|
71
67
| RISC-V 64-bit | riscv_64 |`riscv64-linux-musl`|
72
68
73
-
More target may be available in the future, get in touch with us if
74
-
you need:
75
-
76
-
-`aarch64[_be]-linux-musl`
77
-
-`i*86-linux-musl`
78
-
-`microblaze[el]-linux-musl`
79
-
-`mips-linux-musl`
80
-
-`mips[el]-linux-musl[sf]`
81
-
-`mips64[el]-linux-musl[n32][sf]`
82
-
-`powerpc-linux-musl[sf]`
83
-
-`powerpc64[le]-linux-musl`
84
-
-`s390x-linux-musl`
85
-
-`sh*[eb]-linux-musl[fdpic][sf]`
86
-
-`x86_64-linux-musl[x32]`
69
+
More target may be available in the future, [get in touch with us](mailto:info@dyne.org) if you need:
0 commit comments