|
7 | 7 | # There is no default TARGET; you must select one here or on the make |
8 | 8 | # command line. Some examples: |
9 | 9 |
|
| 10 | +ARCH ?= x86_64 |
| 11 | +TARGET = $(ARCH)-linux-musl |
| 12 | + |
10 | 13 | # TARGET = i486-linux-musl |
11 | 14 | # TARGET = x86_64-linux-musl |
12 | 15 | # TARGET = arm-linux-musleabi |
|
32 | 35 | # Setting a blank version for linux will suppress installation of kernel |
33 | 36 | # headers, which are not needed unless compiling programs that use them. |
34 | 37 |
|
35 | | -# BINUTILS_VER = 2.25.1 |
36 | | -# GCC_VER = 5.2.0 |
37 | | -# MUSL_VER = git-master |
38 | | -# GMP_VER = |
39 | | -# MPC_VER = |
40 | | -# MPFR_VER = |
41 | | -# ISL_VER = |
42 | | -# LINUX_VER = |
| 38 | +BINUTILS_VER = 2.44 |
| 39 | +GCC_VER = 14.3.0 |
| 40 | +MUSL_VER = 1.2.5 |
| 41 | +GMP_VER = 6.3.0 |
| 42 | +MPC_VER = 1.3.1 |
| 43 | +MPFR_VER = 4.2.2 |
| 44 | +ISL_VER = 0.27 |
| 45 | +LINUX_VER = 5.15.202 |
43 | 46 |
|
44 | 47 | # By default source archives are downloaded with wget. curl is also an option. |
45 | 48 |
|
|
49 | 52 | # Check sha-1 hashes of downloaded source archives. On gnu systems this is |
50 | 53 | # usually done with sha1sum. |
51 | 54 |
|
52 | | -# SHA1_CMD = sha1sum -c |
53 | 55 | # SHA1_CMD = sha1 -c |
| 56 | +# SHA1_CMD = sha1sum -c |
54 | 57 | # SHA1_CMD = shasum -a 1 -c |
55 | 58 |
|
56 | 59 | # Something like the following can be used to produce a static-linked |
|
59 | 62 | # system you build on can natively (or via binfmt_misc and qemu) run |
60 | 63 | # binaries produced by the existing toolchain (in this example, i486). |
61 | 64 |
|
62 | | -# COMMON_CONFIG += CC="i486-linux-musl-gcc -static --static" CXX="i486-linux-musl-g++ -static --static" |
63 | | - |
64 | | -# Recommended options for smaller build for deploying binaries: |
65 | | - |
66 | | -# COMMON_CONFIG += CFLAGS="-g0 -Os" CXXFLAGS="-g0 -Os" LDFLAGS="-s" |
| 65 | +# COMMON_CONFIG += CC="$(TARGET)-gcc -static --static" CXX="$(TARGET)-g++ -static --static" |
| 66 | + |
| 67 | +# Reported values relates to an i5-8365 fast-SSD and c.a. 18m compiling time |
| 68 | +# # Recommended options for smal/fast build for deploying toolchain (w/ -pipe): |
| 69 | +COMMON_CONFIG += CFLAGS="-g0 -O1 -pipe" CXXFLAGS="-g0 -O1 -pipe" LDFLAGS="-s" |
| 70 | +# # Compressed size is 13% less than -O2 and, surprisingly, buildall +4% faster |
| 71 | +# # COMMON_CONFIG += CFLAGS="-g0 -Os" CXXFLAGS="-g0 -Os" LDFLAGS="-s" |
| 72 | +# # Compiles a toolchain for being faster in doing its works, but bigger size |
| 73 | +# # COMMON_CONFIG += CFLAGS="-g0 -O2" CXXFLAGS="-g0 -O2" LDFLAGS="-s" |
| 74 | +# # Pipe can increase the compilation speed of +6%, but it is sensitive: |
| 75 | +# # COMMON_CONFIG += CFLAGS="-g0 -O2 -pipe" CXXFLAGS="-g0 -O2 -pipe" LDFLAGS="-s" |
| 76 | +# Notes: |
| 77 | +# # Definetely avoid -O3 because a single mistake in a toolchain avalanches |
| 78 | +# # Recommended -O1 -pipe is +7% larger than -Os and -7% smaller than -O2 |
| 79 | +# # Recommended -O1 -pipe is 10% faster than -Os and +14% faster than -O2 |
67 | 80 |
|
68 | 81 | # Options you can add for faster/simpler build at the expense of features: |
69 | 82 |
|
|
0 commit comments