| 
 | 1 | +# By default, cross compilers are installed to ./output under the top-level  | 
 | 2 | +# musl-cross-make directory and can later be moved wherever you want them.  | 
 | 3 | +# To install directly to a specific location, set it here. Multiple targets  | 
 | 4 | +# can safely be installed in the same location. Some examples:  | 
 | 5 | + | 
 | 6 | +#OUTPUT = /opt/musl/armhf  | 
 | 7 | + | 
 | 8 | +# By default, latest supported release versions of musl and the toolchain  | 
 | 9 | +# components are used. You can override those here, but the version selected  | 
 | 10 | +# must be supported (under hashes/ and patches/) to work. For musl, you  | 
 | 11 | +# can use "git-refname" (e.g. git-master) instead of a release. Setting a  | 
 | 12 | +# blank version for gmp, mpc, mpfr and isl will suppress download and  | 
 | 13 | +# in-tree build of these libraries and instead depend on pre-installed  | 
 | 14 | +# libraries when available (isl is optional and not set by default).  | 
 | 15 | +# Setting a blank version for linux will suppress installation of kernel  | 
 | 16 | +# headers, which are not needed unless compiling programs that use them.  | 
 | 17 | + | 
 | 18 | +# BINUTILS_VER =  | 
 | 19 | +GCC_VER = 11.2.0  | 
 | 20 | + | 
 | 21 | +# https://github.com/rust-embedded/cross/issues/478  | 
 | 22 | +# https://github.com/rust-lang/libc/issues/1848  | 
 | 23 | + | 
 | 24 | +MUSL_VER = 1.1.24  | 
 | 25 | + | 
 | 26 | +# GMP_VER =  | 
 | 27 | +# MPC_VER =  | 
 | 28 | +# MPFR_VER =  | 
 | 29 | +# ISL_VER =  | 
 | 30 | +# LINUX_VER =  | 
 | 31 | + | 
 | 32 | +# By default source archives are downloaded with wget. curl is also an option.  | 
 | 33 | + | 
 | 34 | +# DL_CMD = wget -c -O  | 
 | 35 | +DL_CMD = curl -C - -L -o  | 
 | 36 | + | 
 | 37 | +# Something like the following can be used to produce a static-linked  | 
 | 38 | +# toolchain that's deployable to any system with matching arch, using  | 
 | 39 | +# an existing musl-targeted cross compiler. This only # works if the  | 
 | 40 | +# system you build on can natively (or via binfmt_misc and # qemu) run  | 
 | 41 | +# binaries produced by the existing toolchain (in this example, i486).  | 
 | 42 | + | 
 | 43 | +# COMMON_CONFIG += CC="i486-linux-musl-gcc -static --static" CXX="i486-linux-musl-g++ -static --static"  | 
 | 44 | + | 
 | 45 | +# Recommended options for smaller build for deploying binaries:  | 
 | 46 | + | 
 | 47 | +COMMON_CONFIG += CFLAGS="-g0 -Os -w" CXXFLAGS="-g0 -Os -w" LDFLAGS="-s"  | 
 | 48 | + | 
 | 49 | +# Recommended options for faster/simpler build:  | 
 | 50 | + | 
 | 51 | +COMMON_CONFIG += --disable-nls  | 
 | 52 | +GCC_CONFIG += --enable-languages=c,c++  | 
 | 53 | +GCC_CONFIG += --disable-libquadmath --disable-decimal-float  | 
 | 54 | +GCC_CONFIG += --disable-multilib  | 
 | 55 | + | 
 | 56 | +# You can keep the local build path out of your toolchain binaries and  | 
 | 57 | +# target libraries with the following, but then gdb needs to be told  | 
 | 58 | +# where to look for source files.  | 
 | 59 | + | 
 | 60 | +COMMON_CONFIG += --with-debug-prefix-map=$(CURDIR)=  | 
0 commit comments