tag:blogger.com,1999:blog-3813856659277593071.post9027692641646550976..comments2023-05-10T17:32:28.225+02:00Comments on The Beez' speaks..: Cross compiler bluesThe Beez'http://www.blogger.com/profile/14718864828133872589noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-3813856659277593071.post-52146747783890121132008-01-07T13:47:00.000+01:002008-01-07T13:47:00.000+01:00Any word on how to make a cross-compiler for macs?...Any word on how to make a cross-compiler for macs?<BR/><BR/>I prefer virtualbox + mingw to ming32 just on linux, but virtualization is beaten off by apple's eula.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3813856659277593071.post-60714008690241550972008-01-04T03:37:00.000+01:002008-01-04T03:37:00.000+01:00You know.With debian, it is much more easy to inst...You know.<BR/>With debian, it is much more easy to install a cross compiler; it has precompiled libs:<BR/><BR/>$ apt-get -Y install mingw32<BR/>$ i586-mingw32msvc-cc hello.c<BR/>$ wine a.exe<BR/>Hello!<BR/>$Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3813856659277593071.post-65081977875672402552008-01-02T16:14:00.000+01:002008-01-02T16:14:00.000+01:00Before I developed mingw_cross_env, I used the min...Before I developed mingw_cross_env, I used the mingw32 Debian package, too. However, this solves only the simple part: Creating a cross compiler.<BR/><BR/>However, you also need to port the libraries used by your application, and many libraries need special tweaks beyond "--host=...". This is the essential problem! Building a cross compiler is comparatively trivial.<BR/><BR/>I started with <A HREF="http://www.profv.de/debian/" REL="nofollow">repackaging the Gnuwin32 packages</A>. However, Gnuwin32 has no transparent build process, and the binary packages are not as uniform as e.g. RPM or Debian packages. I had no insight in how the Gnuwin32 authors built their packages, and I needed many libraries they didn't offer.<BR/><BR/>The next experiment was <A HREF="http://wiki.njh.eu/Cross_Compiling_for_Win32#Debian_cross_compiling_for_w32-i386" REL="nofollow">porting some Debian packages</A> using the well-patched Debian sources and dpkg-cross. However, for some libraries there is too much to do for win32, so I worked more against the Debian tools than with them.<BR/><BR/>It became clear that I need something similar to the BSD ports collection or the Gentoo portage system. So I created a <A HREF="http://www.profv.de/mingw_cross_env/" REL="nofollow">simple but comprehensive shell script</A> which built every library from source.<BR/><BR/>First, it cross compiled only the libraries. Then I took the opportunity to build the cross compiler there as well, making it independent from Debian. Feel free to remove the code sections that create binutils and gcc, and to use the mingw32 package instead. But this won't simplify much, because the <B>essential</B> problem remains <B>porting the libraries</B>.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3813856659277593071.post-69022806549438690002007-12-31T12:35:00.000+01:002007-12-31T12:35:00.000+01:00I've too started doing cross compilations and it c...I've too started doing cross compilations and it cuts down release times enormously as we provide an executable for Windows users. On Ubuntu it is really easy to get going, just install the various bits (from the universe repository):<BR/><BR/>sudo apt-get install mingw32 mingw32-binutils mingw32-runtime wine<BR/><BR/>Then build your package adding the following options to your configure step:<BR/><BR/>./configure --host=i586-mingw32msvc --build=i686-linux<BR/><BR/>The installation step above includes wine, so once you have compiled your package you should even be able to run the resulting Windows executable on Linux and possibly your entire set of regression tests if you have them. All without the headaches of configuring and maintaining a Windows build machine :)Unknownhttps://www.blogger.com/profile/13777960190311790005noreply@blogger.com