File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed
Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ libs: dyne/$(ARCH)/lib/libssl.a
1616prepare :
1717 sh prepare.sh $(ARCH )
1818
19- /alpine/enter-chroot : APKS := bash make cmake gcc build-base curl patch gawk ccache perl rsync xz samurai coreutils-fmt
19+ /alpine/enter-chroot : APKS := bash make cmake gcc build-base musl-dev curl patch gawk ccache perl rsync xz samurai coreutils-fmt
2020/alpine/enter-chroot :
2121 $(info 💪 Alpine chroot packages: $(APKS ) )
2222 ./alpine-chroot-install -a x86_64 -d /alpine -p " $( APKS) "
Original file line number Diff line number Diff line change @@ -81,6 +81,16 @@ musl-cross-make's patch set provides:
8181- Support for J2 Core CPU target in GCC & binutils
8282- SH/FDPIC ABI support
8383
84+ ## Build it yourself
85+
86+ In order to build a static toolchain, we use Alpine in a chroot with bind-mount of current dir and therefore require super-user privileges.
87+
88+ The sequence of commands to build is:
89+ 1 . ` sudo make chroot `
90+ 2 . ` /alpine/enter-chroot make gcc `
91+ 3 . ` /alpine/enter-chroot make libs `
92+
93+ Assuming you are building in ` /home/user/devel/musl ` then the built toolchain will be found in ` /opt/alpine/home/user/devel/musl/dyne ` .
8494
8595## License
8696
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ COMMON_CONFIG += CFLAGS="-g0 -Os -march=x86-64-v2"
1010COMMON_CONFIG += CXXFLAGS="-g0 -Os -march=x86-64-v2"
1111# -march=x86-64-v2 -march=haswell
1212COMMON_CONFIG += LDFLAGS="-s"
13- COMMON_CONFIG += CC="ccache gcc -static"
14- COMMON_CONFIG += CXX="ccache g++ -static"
13+ COMMON_CONFIG += CC="ccache gcc -static --static "
14+ COMMON_CONFIG += CXX="ccache g++ -static --static "
1515COMMON_CONFIG += --disable-nls --disable-libmudflap --disable-libsanitizer --disable-lto
1616# --disable-libquadmath --disable-decimal-float --disable-libitm
1717# --disable-fixed-point --disable-lto
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ R := $(shell dirname $(CURDIR))
1515T := $(R ) /dyne/$(ARCH )
1616
1717GCC_BINS := $(R ) /dyne/gcc-musl/bin/$(ARCH )
18- CC := ccache $(GCC_BINS ) -gcc
19- CXX := ccache $(GCC_BINS ) -g++
18+ CC := ccache $(GCC_BINS ) -gcc --static
19+ CXX := ccache $(GCC_BINS ) -g++ --static
2020ASM := $(GCC_BINS ) -as
2121AR := $(GCC_BINS ) -ar
2222
You can’t perform that action at this time.
0 commit comments