You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2010/08/31 18:51:32 UTC

svn commit: r991257 - /incubator/thrift/trunk/contrib/mingw-cross-compile.sh

Author: dreiss
Date: Tue Aug 31 16:51:32 2010
New Revision: 991257

URL: http://svn.apache.org/viewvc?rev=991257&view=rev
Log:
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.

Added:
    incubator/thrift/trunk/contrib/mingw-cross-compile.sh   (with props)

Added: incubator/thrift/trunk/contrib/mingw-cross-compile.sh
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/contrib/mingw-cross-compile.sh?rev=991257&view=auto
==============================================================================
--- incubator/thrift/trunk/contrib/mingw-cross-compile.sh (added)
+++ incubator/thrift/trunk/contrib/mingw-cross-compile.sh Tue Aug 31 16:51:32 2010
@@ -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

Propchange: incubator/thrift/trunk/contrib/mingw-cross-compile.sh
------------------------------------------------------------------------------
    svn:executable = *