sabotage.config (2365B)
1 ## set the arch you're building for 2 #export A=i386 3 export A=x86_64 4 #export A=x86_64-x32 5 #export A=mips 6 #export A=powerpc 7 #export A=microblaze 8 #export A=sh 9 #export A=arm 10 11 [ -z "$A" ] && { printf "ERROR: no arch set\n" ; exit 1 ; } 12 13 # arch specific flags to pass to the gcc build 14 # your crosscompiler should be configured equivalently 15 # if not provided, will be derived from the crosscompiler config 16 #export GCC_ARCH_CONFIG_FLAGS="--with-float=soft --with-fpu=vfp" 17 18 # set to basepath containing your musl-cross toolchains 19 # we assume there's a subdir equal to the triplet in there 20 #crosstoolchain=$HOME/musl-cross-make-6.5.0 21 crosstoolchain="@@PWD@@/local" 22 23 #set toolchain triplet 24 #triplet=x86_64-linux-muslx32 25 #triplet=arm-linux-musleabihf 26 triplet=$A-linux-musl 27 28 # point S to sabotage checkout or /src dir of an existing sabotage install 29 # path is used to lookup KEEP, pkg and tarballs dirs 30 #export S=/src 31 export S="@@PWD@@/sabotage" 32 33 # set R to the rootfs path (where stuff gets installed to) 34 export R="@@PWD@@/sabotage-image" 35 36 # set number of parallel make processes 37 export MAKE_THREADS=@@JOBS@@ 38 39 # set BRUTE to 1 to enable LTO in the standard etc/butch-optflags profile 40 # (slow to compile, but results in minimal binary size and very fast code) 41 #export BRUTE=1 42 # set TESTBUILD to 1 to build everything without optimization/debug (much faster) 43 #export TESTBUILD=1 44 45 # typically, you shouldn't have to change any of the vars after this line 46 47 export K=$S/KEEP 48 # where stuff gets built 49 export B=$R/src/build 50 export C=$S/tarballs 51 export LOGPATH=$R/src/logs 52 export BUTCHDB=$R/var/lib/butch.db 53 export butch_filelists=$R/src/filelists 54 export butch_tarballs_used=$R/src/tarballs_used.txt 55 export BUTCH_BUILD_TEMPLATE=$K/butch_build_template.txt 56 export BUTCH_DOWNLOAD_TEMPLATE=$K/butch_download_template.txt 57 58 export PATH="$PATH":$crosstoolchain/$triplet/bin 59 60 export CC="$triplet-gcc -L$R/lib -isystem $R/include" 61 export CXX="$triplet-g++ -L$R/lib -isystem $R/include" 62 export CROSS_COMPILE=$triplet- 63 export HOSTCC=gcc 64 export HOSTCXX=g++ 65 66 export STAGE=1 67 export PKG_CONFIG_SYSROOT_DIR=$R 68 export PKG_CONFIG_LIBDIR=$R/lib/pkgconfig 69 # do not build host/runtime deps 70 export DEPS=build 71 72 if ! test -d "$R" ; then 73 echo "ERROR: R points to non-existing path $R">&2 74 exit 1 75 fi 76 if ! $CC --version >/dev/null 2>&1 ; then 77 echo "ERROR! toolchain $CC not found in PATH $PATH">&2 78 exit 1 79 fi 80