Files
llvm-mingw/build-mingw-w64-libraries.sh
T
Martin Storsjö d4a27dfd80 Stop manually setting CC/AR/RANLIB when building autotools projects
Since we have triplet prefixed wrappers for all tools, and wrappers
named <triplet>-gcc/g++ as well, we don't need to manually provide
them.
2019-08-13 12:51:42 +03:00

32 lines
644 B
Bash
Executable File

#!/bin/sh
set -e
if [ $# -lt 1 ]; then
echo $0 dest
exit 1
fi
PREFIX="$1"
mkdir -p "$PREFIX"
PREFIX="$(cd "$PREFIX" && pwd)"
export PATH=$PREFIX/bin:$PATH
: ${CORES:=$(nproc 2>/dev/null)}
: ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}
: ${CORES:=4}
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
cd mingw-w64/mingw-w64-libraries
for lib in winpthreads winstorecompat; do
cd $lib
for arch in $ARCHS; do
mkdir -p build-$arch
cd build-$arch
../configure --host=$arch-w64-mingw32 --prefix=$PREFIX/$arch-w64-mingw32
make -j$CORES
make install
cd ..
done
cd ..
done