summaryrefslogtreecommitdiff
path: root/contrib/mingw-cross-compile.sh
blob: 7ed5d47738c7ce78cad45ce9f9885c4b56b9a4b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
set -e

./configure \
  --disable-libs \
  --build=i686-pc-linux-gnu \
  --host=i586-mingw32msvc \
  CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++

make

# Check two locations to be compatible with libtool 1.5.26 or 2.2.6b.
if test -f compiler/cpp/.libs/thrift.exe ; then
  i586-mingw32msvc-strip compiler/cpp/.libs/thrift.exe -o ./thrift.exe
else 
  i586-mingw32msvc-strip compiler/cpp/thrift.exe -o ./thrift.exe
fi
echo "Finished compiling with resulting exe"
ls -l ./thrift.exe