Some improvements to musl libc build script.
This commit is contained in:
parent
207039f4f7
commit
fc2784b256
@ -10,10 +10,11 @@ function mk_musl() {
|
|||||||
rm -rf "${build}" && mkdir -p "${build}"
|
rm -rf "${build}" && mkdir -p "${build}"
|
||||||
tar -xvf "musl-latest.tar.gz" --strip-components=1 -C "${build}"
|
tar -xvf "musl-latest.tar.gz" --strip-components=1 -C "${build}"
|
||||||
pushd "${build}"
|
pushd "${build}"
|
||||||
|
local optdirs="$(find './src' -mindepth 1 -maxdepth 1 -type d -printf '%f,' | sed 's/,$//g')"
|
||||||
if [ -z "${2}" ]; then
|
if [ -z "${2}" ]; then
|
||||||
./configure --prefix="${outdir}"
|
./configure --enable-optimize="${optdirs}" --disable-shared --prefix="${outdir}"
|
||||||
else
|
else
|
||||||
./configure --host="${2}" --prefix="${outdir}"
|
./configure --enable-optimize="${optdirs}" --disable-shared --prefix="${outdir}" --host="${2}"
|
||||||
fi
|
fi
|
||||||
make
|
make
|
||||||
sudo rm -rf "${outdir}"
|
sudo rm -rf "${outdir}"
|
||||||
|
Loading…
Reference in New Issue
Block a user