build-mingw-w64: Add a CHECKOUT_ONLY codepath
This commit is contained in:
1 parent
308f7227c5
commit
57b7ffd84d
2 files changed
+24
-16
No files matched your search
@@ -30,6 +30,10 @@ export PATH="$PREFIX/bin:$PATH"
|
|||||||
: ${CORES:=4}
|
: ${CORES:=4}
|
||||||
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
|
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
|
||||||
|
|
||||||
|
if [ ! -d mingw-w64 ] || [ -n "$SYNC" ]; then
|
||||||
|
CHECKOUT_ONLY=1 ./build-mingw-w64.sh
|
||||||
|
fi
|
||||||
|
|
||||||
cd mingw-w64/mingw-w64-libraries
|
cd mingw-w64/mingw-w64-libraries
|
||||||
for lib in winpthreads winstorecompat; do
|
for lib in winpthreads winstorecompat; do
|
||||||
cd $lib
|
cd $lib
|
||||||
|
|||||||
+20
-16
@@ -41,19 +41,35 @@ while [ $# -gt 0 ]; do
|
|||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
if [ -z "$PREFIX" ]; then
|
if [ -z "$CHECKOUT_ONLY" ]; then
|
||||||
|
if [ -z "$PREFIX" ]; then
|
||||||
echo $0 [--skip-include-triplet-prefix] [--with-default-win32-winnt=0x601] [--with-default-msvcrt=ucrt] [--host=<triple>] dest
|
echo $0 [--skip-include-triplet-prefix] [--with-default-win32-winnt=0x601] [--with-default-msvcrt=ucrt] [--host=<triple>] dest
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$PREFIX"
|
||||||
|
PREFIX="$(cd "$PREFIX" && pwd)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d mingw-w64 ]; then
|
||||||
|
git clone git://git.code.sf.net/p/mingw-w64/mingw-w64
|
||||||
|
CHECKOUT=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd mingw-w64
|
||||||
|
|
||||||
|
if [ -n "$SYNC" ] || [ -n "$CHECKOUT" ]; then
|
||||||
|
[ -z "$SYNC" ] || git fetch
|
||||||
|
git checkout $MINGW_W64_VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -z "$CHECKOUT_ONLY" ] || exit 0
|
||||||
|
|
||||||
MAKE=make
|
MAKE=make
|
||||||
if [ "$(which gmake)" != "" ]; then
|
if [ "$(which gmake)" != "" ]; then
|
||||||
MAKE=gmake
|
MAKE=gmake
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$PREFIX"
|
|
||||||
PREFIX="$(cd "$PREFIX" && pwd)"
|
|
||||||
|
|
||||||
ORIGPATH="$PATH"
|
ORIGPATH="$PATH"
|
||||||
if [ -z "$HOST" ]; then
|
if [ -z "$HOST" ]; then
|
||||||
# The newly built toolchain isn't crosscompiled; add it to the path.
|
# The newly built toolchain isn't crosscompiled; add it to the path.
|
||||||
@@ -69,18 +85,6 @@ fi
|
|||||||
: ${CORES:=4}
|
: ${CORES:=4}
|
||||||
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
|
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
|
||||||
|
|
||||||
if [ ! -d mingw-w64 ]; then
|
|
||||||
git clone git://git.code.sf.net/p/mingw-w64/mingw-w64
|
|
||||||
CHECKOUT=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd mingw-w64
|
|
||||||
|
|
||||||
if [ -n "$SYNC" ] || [ -n "$CHECKOUT" ]; then
|
|
||||||
[ -z "$SYNC" ] || git fetch
|
|
||||||
git checkout $MINGW_W64_VERSION
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If crosscompiling the toolchain itself, we already have a mingw-w64
|
# If crosscompiling the toolchain itself, we already have a mingw-w64
|
||||||
# runtime and don't need to rebuild it.
|
# runtime and don't need to rebuild it.
|
||||||
if [ -z "$HOST" ]; then
|
if [ -z "$HOST" ]; then
|
||||||
|
|||||||
Reference in new issue
Block a user