diff options
author | David Reiss <dreiss@apache.org> | 2010-08-31 16:51:32 +0000 |
---|---|---|
committer | David Reiss <dreiss@apache.org> | 2010-08-31 16:51:32 +0000 |
commit | 37b3df2c40b1ea37ef75cc58b7a635e9c6202870 (patch) | |
tree | 2fe9f6389d0066e346dde4382daf327ccf60ca9e /contrib/mingw-cross-compile.sh | |
parent | 79db3e16ec7ce0a5323f2cc14b80142b1447f8ac (diff) | |
download | thrift-37b3df2c40b1ea37ef75cc58b7a635e9c6202870.tar.gz |
THRIFT-874. Add script to cross-compile the Thrift compiler for Windows
This script cross compiles the Thrift compiler from Ubuntu 10.04 to
Windows using the gcc-mingw32 package. Run it from a fresh release
tarball.
All of the runtime libraries are disabled. This is just for building
the compiler.
I set --build and --host to ensure that autoconf knows we are
cross-compiling.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991257 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'contrib/mingw-cross-compile.sh')
-rwxr-xr-x | contrib/mingw-cross-compile.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/mingw-cross-compile.sh b/contrib/mingw-cross-compile.sh new file mode 100755 index 000000000..9e8e054f9 --- /dev/null +++ b/contrib/mingw-cross-compile.sh @@ -0,0 +1,26 @@ +#!/bin/sh +set -e + +./configure \ + --without-cpp \ + --without-java \ + --without-csharp \ + --without-python \ + --without-ruby \ + --without-perl \ + --without-php \ + --without-erlang \ + --build=i686-pc-linux-gnu \ + --host=i586-mingw32msvc \ + CPPFLAGS='-DMINGW' + +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 cp compiler/cpp/.libs/thrift.exe ./thrift.exe + else cp compiler/cpp/thrift.exe ./thrift.exe +fi +i586-mingw32msvc-strip ./thrift.exe +echo +ls -l ./thrift.exe |