aboutsummaryrefslogtreecommitdiff
path: root/scripts/setup_musl_cross.sh
blob: 6ae5dd6d943e238012304c940445f830c9007592 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
. ./.vars
# VERSION=3.3.2
APP_NAME="musl-cross-make"
BUILD_DIR="${build_dir}/$APP_NAME"
if ! [ -d "$BUILD_DIR" ] ; then
	cd "$build_dir"
	git clone ${dist_dir}/$APP_NAME
fi
cd "$BUILD_DIR"
export CC=$BUILD_TGT-gcc
export CFLAGS="-I$prefix/usr/include -static"
export DESTDIR=$prefix
export LDFLAGS="-L$prefix/usr/lib/ -static"
rm config.log || echo ""
make clean || echo ""
./configure \
	--host=$BUILD_TGT \
	--prefix=/usr \
	--without-xml2 \
	--enable-bsdtar=static \
	--enable-bsdcpio=static \
	--enable-bsdcat=static \
	--without-openssl \
	--with-sysroot=$prefix
make -j$(nproc)
make install