I took some shortcuts to get the OpenOffice.org cross build going, read along.
Cross compile support for OO.o is not yet self hosting. Several custom tools are used in the build process (dmake, makedepend, regcomp, idlc, helpex, transex3, ...). These tools are created as part of the build process. They are happily compiled along with the rest of the software, with the same compiler. It's not straightforward to tell what tools and libraries are used in the build process only and can be built using CC_FOR_BUILD, and which tools and libraries need to be built twice, both with CC and CC_FOR_BUILD.
Instead of fixing this properly right now, we'll be using tools from a native build.
It's easy to add a native OO.o build to GUB, but as we all have a recent build laying around it would be a waste not to use that, right? If this is the first OO.o build on your box, install all build dependencies
sudo zypper source-install OpenOffice_org # SUSE sudo apt-get build-dep openoffice.org # Debian, UbuntuSo first, build a recent version of OpenOffice.org. Easiest is using ooo-build, do something like
mkdir -p ~/vc && cd ~/vc svn co svn://svn.gnome.org/svn/ooo-build/trunk ooo-trunk.svn && cd ooo-trunk.svn ./autogen.sh --with-distro=SUSE --with-git --with-gcc-speedup=ccache,icecream ./download bin/gob reset make
The cross build process uses not only the wrc resource compiler, but also Wine itself to run regcomp.exe . We cannot simply use regcomp from the native build. Apparently regcomp has compile time switches rather than run time options that to tweak its behaviour. Yuck.
Using Wine is a most gross hack, as this precludes cross building to other platforms, such as Solaris.
sudo zypper install wine # SUSE sudo apt-get install wine # Debian, Ubuntu
Enter GUB3. Do
git clone git://github.com/janneke/gub.git cd gub export OOO_TOOLS_DIR=$HOME/vc/ooo-trunk.svn/build/ooo3-m9/solver/300/unxlngx6.pro/bin # or your directory here bin/gub mingw::openoffice
That's all. Do I need to say this is experimental and it won't work for you? This is experimental, it won't work for you. Please send patches to me ;-)
$(GUI) == WNT
into $(TARGET_OS) == WNT or $(BUILD_OS)
== WNT. Similar for $(OS)$(COM) == WNTGCC
and $(CROSS_COMPILING).
__MINGW32__
and __CROSS__.
set_soenv.in and solenv/inc/*
and migrate to fine grained individual tests
in config_office/configure.in. Before we can
to that, we first need to junk^H^H^H^H rethink the necessity
of all the aggregated library cruft from the source tree
(e.g.: afms, boost, cairo, cppunit, curl, db, dmake, expat,
fondu, fontconfig, hunspell, hyphen, icc, libicu, libjpeg,
liblpsolve, libpng, libtextcat, libwpd, libwpg, libwps,
libxml2, libxmlsec, libxslt, lpsolve, lucene, mozilla, neon,
openssl, python, redland, rhino, sablot, saxon-java, stax,
stl, tomcat, vigra, xalan, xerces-c, xpdf, zlib, ...?).