build-mingw-w64.sh: Make configure args easier to read

This commit is contained in:
Andrew Eikum 2019-11-25 13:01:22 -06:00
parent 0bdd04209c
commit 7600c157b4

View File

@ -69,7 +69,14 @@ function build_arch {
mkdir -p binutils/ mkdir -p binutils/
pushd binutils/ pushd binutils/
if [ ! -e Makefile ]; then if [ ! -e Makefile ]; then
../../$BINUTILS_SRCDIR/configure --prefix=$DST_DIR/ --build=$BUILD_ARCH --host=$HOST_ARCH --target=$WIN32_TARGET_ARCH --disable-multilib --enable-lto $BINUTILS_EXTRA_CONFIGURE ../../$BINUTILS_SRCDIR/configure \
--prefix=$DST_DIR/ \
--build=$BUILD_ARCH \
--host=$HOST_ARCH \
--target=$WIN32_TARGET_ARCH \
--disable-multilib \
--enable-lto \
$BINUTILS_EXTRA_CONFIGURE
fi fi
make $JOBS configure-host make $JOBS configure-host
make $JOBS LDFLAGS=-all-static make $JOBS LDFLAGS=-all-static
@ -79,7 +86,13 @@ function build_arch {
mkdir -p mingw-w64-headers/ mkdir -p mingw-w64-headers/
pushd mingw-w64-headers/ pushd mingw-w64-headers/
if [ ! -e Makefile ]; then if [ ! -e Makefile ]; then
PATH=$NEWPATH:$PATH ../../$MINGW_W64_SRCDIR/mingw-w64-headers/configure --prefix=$DST_DIR/$WIN32_TARGET_ARCH/ --host=$WIN32_TARGET_ARCH --enable-sdk=all --enable-secure-api --enable-idl $MINGW_W64_HEADERS_EXTRA_CONFIGURE PATH=$NEWPATH:$PATH ../../$MINGW_W64_SRCDIR/mingw-w64-headers/configure \
--prefix=$DST_DIR/$WIN32_TARGET_ARCH/ \
--host=$WIN32_TARGET_ARCH \
--enable-sdk=all \
--enable-secure-api \
--enable-idl \
$MINGW_W64_HEADERS_EXTRA_CONFIGURE
fi fi
PATH=$NEWPATH:$PATH make $JOBS install PATH=$NEWPATH:$PATH make $JOBS install
popd popd
@ -90,11 +103,23 @@ function build_arch {
#arguments mostly taken from Arch AUR mingw-w64-gcc PKGBUILD, #arguments mostly taken from Arch AUR mingw-w64-gcc PKGBUILD,
#except "--disable-dw2-exceptions" swapped for "--disable-sjlj-exceptions --with-dwarf2" #except "--disable-dw2-exceptions" swapped for "--disable-sjlj-exceptions --with-dwarf2"
#for performance reasons on 32-bit #for performance reasons on 32-bit
LDFLAGS=-static PATH=$NEWPATH:$PATH ../../$GCC_SRCDIR/configure --prefix=$DST_DIR/ \ LDFLAGS=-static PATH=$NEWPATH:$PATH ../../$GCC_SRCDIR/configure \
--build=$BUILD_ARCH --host=$HOST_ARCH --target=$WIN32_TARGET_ARCH --with-gnu-ld --with-gnu-as \ --prefix=$DST_DIR/ \
--enable-languages=c,c++ --disable-multilib --enable-threads=posix --enable-fully-dynamic-string \ --build=$BUILD_ARCH \
--enable-libstdcxx-time=yes --enable-libstdcxx-filesystem-ts=yes --enable-cloog-backend=isl \ --host=$HOST_ARCH \
--enable-lto --disable-sjlj-exceptions --with-dwarf2 \ --target=$WIN32_TARGET_ARCH \
--with-gnu-ld \
--with-gnu-as \
--enable-languages=c,c++ \
--disable-multilib \
--enable-threads=posix \
--enable-fully-dynamic-string \
--enable-libstdcxx-time=yes \
--enable-libstdcxx-filesystem-ts=yes \
--enable-cloog-backend=isl \
--enable-lto \
--disable-sjlj-exceptions \
--with-dwarf2 \
$GCC_EXTRA_CONFIGURE $GCC_EXTRA_CONFIGURE
fi fi
PATH=$NEWPATH make $JOBS all-gcc PATH=$NEWPATH make $JOBS all-gcc
@ -104,7 +129,10 @@ function build_arch {
mkdir -p mingw-w64-crt/ mkdir -p mingw-w64-crt/
pushd mingw-w64-crt/ pushd mingw-w64-crt/
if [ ! -e Makefile ]; then if [ ! -e Makefile ]; then
PATH=$NEWPATH ../../$MINGW_W64_SRCDIR/mingw-w64-crt/configure --prefix=$DST_DIR/$WIN32_TARGET_ARCH/ --host=$WIN32_TARGET_ARCH $MINGW_W64_CRT_EXTRA_CONFIGURE PATH=$NEWPATH ../../$MINGW_W64_SRCDIR/mingw-w64-crt/configure \
--prefix=$DST_DIR/$WIN32_TARGET_ARCH/ \
--host=$WIN32_TARGET_ARCH \
$MINGW_W64_CRT_EXTRA_CONFIGURE
fi fi
PATH=$NEWPATH make $JOBS PATH=$NEWPATH make $JOBS
PATH=$NEWPATH make $JOBS install PATH=$NEWPATH make $JOBS install
@ -113,7 +141,10 @@ function build_arch {
mkdir -p mingw-w64-winpthreads/ mkdir -p mingw-w64-winpthreads/
pushd mingw-w64-winpthreads/ pushd mingw-w64-winpthreads/
if [ ! -e Makefile ]; then if [ ! -e Makefile ]; then
PATH=$NEWPATH ../../$MINGW_W64_SRCDIR/mingw-w64-libraries/winpthreads/configure --prefix=$DST_DIR/$WIN32_TARGET_ARCH/ --host=$WIN32_TARGET_ARCH $MINGW_W64_WINPTHREADS_EXTRA_CONFIGURE PATH=$NEWPATH ../../$MINGW_W64_SRCDIR/mingw-w64-libraries/winpthreads/configure \
--prefix=$DST_DIR/$WIN32_TARGET_ARCH/ \
--host=$WIN32_TARGET_ARCH \
$MINGW_W64_WINPTHREADS_EXTRA_CONFIGURE
fi fi
PATH=$NEWPATH make $JOBS PATH=$NEWPATH make $JOBS
PATH=$NEWPATH make $JOBS install PATH=$NEWPATH make $JOBS install