Made cross compiling easier;

run configure --host=i586-mingw32 --build=i586-linux
, for example, to cross compile from linux to windows using
i586-mingw32-xxx binaries.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Harco de Hilster
1999-07-21 18:45:25 +00:00
parent e41bbc80bc
commit 214960fb6d
2 changed files with 20 additions and 11 deletions

View File

@@ -129,15 +129,19 @@ sure that your configure setup is basically sound.)
To cross compile the windows library, do To cross compile the windows library, do
-> cd win32 -> cd win32
Now run configure. There are two ways to do this
-> ../configure --host=i586-mingw32 --build=i586-linux --with-mingw \
--enable-dnd=no
where --build= should read whatever platform you're building on. Configure
will notice that build and host platforms differ, and automatically prepend
i586-mingw32- to gcc, ar, ld, etc (make sure they're in the PATH!).
The other way to run configure is by specifying the names of the binaries
yourself:
-> CC=i586-mingw32-gcc CXX=i586-mingw32-g++ RANLIB=i586-mingw32-ranlib \ -> CC=i586-mingw32-gcc CXX=i586-mingw32-g++ RANLIB=i586-mingw32-ranlib \
DLLTOOL=i586-mingw32-dlltool LD=i586-mingw32-ld NM=i586-mingw32-nm \ DLLTOOL=i586-mingw32-dlltool LD=i586-mingw32-ld NM=i586-mingw32-nm \
../configure --host=i586-mingw32 --with-mingw --enable-dnd=no ../configure --host=i586-mingw32 --with-mingw --enable-dnd=no
(assuming you're using mingw32) (all assuming you're using mingw32)
The important thing to notice here is that we suply configure with the names
of all the non-default binutils (make sure they're in the PATH!), and that
we tell configure to build for the host platform i586-mingw32.
Drag'n'drop is disabled because mingw32 lacks (AFAIK) OLE headers. Drag'n'drop is disabled because mingw32 lacks (AFAIK) OLE headers.
Configure will conclude that shared libraries are out of the question and Configure will conclude that shared libraries are out of the question and
@@ -170,3 +174,4 @@ default wx resources into libwx_msw.a?) [ No we can't; the linker won't
link it in... you have to supply an object file ] link it in... you have to supply an object file ]
- dynamic libraries - dynamic libraries
- static executables are HUGE -- there must be room for improvement. - static executables are HUGE -- there must be room for improvement.

View File

@@ -18,7 +18,7 @@ dnl ---------------------------------------------------------------------------
dnl the file passed to AC_INIT should be specific to our package dnl the file passed to AC_INIT should be specific to our package
AC_INIT(wx-config.in) AC_INIT(wx-config.in)
AC_CANONICAL_HOST AC_CANONICAL_SYSTEM
dnl When making releases do: dnl When making releases do:
dnl dnl
@@ -770,11 +770,15 @@ AC_CACHE_SAVE
dnl cross-compiling support: we're cross compiling if the build system is dnl cross-compiling support: we're cross compiling if the build system is
dnl different from the target one (assume host and target be always the same) dnl different from the target one (assume host and target be always the same)
if eval "test $host != $build"; then if eval "test $host != $build"; then
if eval "test $build != NONE"; then if eval "test $host_alias != NONE"; then
CC="$build-gcc" CC=$host_alias-gcc
CXX="$build-g++" CXX=$host_alias-c++
RANLIB="$build-ranlib" AR=$host_alias-ar
NM="$build-nm" RANLIB=$host_alias-ranlib
DLLTOOL=$host_alias-dlltool
LD=$host_alias-ld
NM=$host_alias-nm
STRIP=$host_alias-strip
fi fi
fi fi