aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-06-15 17:13:11 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-06-25 10:41:10 +0100
commit6a714d31d0d68c62e73d264554e4ef86a0f06686 (patch)
tree033a5c199f886fb352ddb3338055c9468a5832ac /autobuild.sh
parentvirsh: Use virXPath wrappers for vncdisplay cmd (diff)
downloadlibvirt-6a714d31d0d68c62e73d264554e4ef86a0f06686.tar.gz
libvirt-6a714d31d0d68c62e73d264554e4ef86a0f06686.tar.bz2
libvirt-6a714d31d0d68c62e73d264554e4ef86a0f06686.zip
Switch automated builds to use Mingw64 toolchain instead of Mingw32
The Mingw32 toolchain is broadly obsoleted by the Mingw64 toolchain. The latter has been adopted by Fedora 17 and newer. Maintaining a RPM spec for Mingw32 is a needless burden, so switch to a Mingw64 RPM spec (which provides 32 & 64 bit builds). Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'autobuild.sh')
-rwxr-xr-xautobuild.sh46
1 files changed, 33 insertions, 13 deletions
diff --git a/autobuild.sh b/autobuild.sh
index 7e8f6459a..b3cb2514b 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -50,30 +50,30 @@ test -x /usr/bin/lcov && make cov
rm -f *.tar.gz
make dist
-if [ -n "$AUTOBUILD_COUNTER" ]; then
+if test -n "$AUTOBUILD_COUNTER" ; then
EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
else
NOW=`date +"%s"`
EXTRA_RELEASE=".$USER$NOW"
fi
-if [ -f /usr/bin/rpmbuild ]; then
+if test -f /usr/bin/rpmbuild ; then
rpmbuild --nodeps \
--define "extra_release $EXTRA_RELEASE" \
--define "_sourcedir `pwd`" \
-ba --clean libvirt.spec
fi
-# Test mingw cross-compile
-if [ -x /usr/bin/i686-pc-mingw32-gcc ]; then
+# Test mingw32 cross-compile
+if test -x /usr/bin/i686-w64-mingw32-gcc ; then
make distclean
- PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig" \
- CC="i686-pc-mingw32-gcc" \
+ PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
+ CC="i686-w64-mingw32-gcc" \
../configure \
- --build=$(uname -m)-pc-linux \
- --host=i686-pc-mingw32 \
- --prefix="$AUTOBUILD_INSTALL_ROOT/i686-pc-mingw32/sys-root/mingw" \
+ --build=$(uname -m)-w64-linux \
+ --host=i686-w64-mingw32 \
+ --prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
--enable-werror \
--without-libvirtd \
--without-python
@@ -81,13 +81,33 @@ if [ -x /usr/bin/i686-pc-mingw32-gcc ]; then
make
make install
- #set -o pipefail
- #make check 2>&1 | tee "$RESULTS"
+fi
+
+# Test mingw64 cross-compile
+if test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
+ make distclean
+
+ PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
+ CC="x86_64-w64-mingw32-gcc" \
+ ../configure \
+ --build=$(uname -m)-w64-linux \
+ --host=x86_64-w64-mingw32 \
+ --prefix="$AUTOBUILD_INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw" \
+ --enable-werror \
+ --without-libvirtd \
+ --without-python
+
+ make
+ make install
+
+fi
+
- if [ -f /usr/bin/rpmbuild ]; then
+if test -x /usr/bin/i686-w64-mingw32-gcc && test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
+ if test -f /usr/bin/rpmbuild ; then
rpmbuild --nodeps \
--define "extra_release $EXTRA_RELEASE" \
--define "_sourcedir `pwd`" \
- -ba --clean mingw32-libvirt.spec
+ -ba --clean mingw-libvirt.spec
fi
fi