Mac OS X cross-compiler problems

Erik van Pienbroek erik at vanpienbroek.nl
Fri Feb 5 18:25:23 UTC 2010


Hi,

Several new packages have just been published. Here are the relevant
changelogs:

--

darwinx-filesystem:
* Thu Feb  4 2010 Erik van Pienbroek <epienbro at fedoraproject.org> - 13-1
- Compile binaries with stabs debug symbols instead of dwarf (because
  dwarf debug symbols require the closed source tool 'dsymutil')

* Sun Jan 31 2010 Erik van Pienbroek <epienbro at fedoraproject.org> - 12-1
- Add CMake support

--

darwinx-sdk-leopard:
* Sat Jan 30 2010 Erik van Pienbroek <epienbro at fedoraproject.org> -
312_2621-14
- Don't bundle the libstdc++ bits

--

darwinx-odcctools:
* Tue Feb  2 2010 Erik van Pienbroek <epienbro at fedoraproject.org> -
0.20090617-12
- Add support for ppc64 (required for multilib gcc)

--

darwinx-gcc:
* Wed Feb  3 2010 Erik van Pienbroek <epienbro at fedoraproject.org> -
42.5646-9
- Merge the crt3.o from x86_64 with the i686 one (needed for c++
programs)

* Tue Feb  2 2010 Erik van Pienbroek <epienbro at fedoraproject.org> -
42.5646-8
- Build with --enable-multilib
- Added a patch to use the correct location of the SDK instead of a
hardcoded one
- Don't install a seperate x86_64 compiler anymore, but merge the x86_64
libgcc.a with the i686 libgcc.a
  This should get 'i686-apple-darwin9-gcc test.c -o test -m64' and
'darwinx-gcc -arch x86_64' working correctly

--

darwinx-libstdcxx:
* Wed Feb  3 2010 Erik van Pienbroek <epienbro at fedoraproject.org> - 39-3
- Merge the x86_64 libraries with the i686 one

* Sat Jan 30 2010 Erik van Pienbroek <epienbro at fedoraproject.org> - 39-2
- Added support for x86_64
- Perform the build with darwinx-gcc instead of darwinx-g++ to
  prevent a circular dependency on libstdcxx

--

darwinx-gettext:
* Thu Feb  5 2010 Erik van Pienbroek <epienbro at fedoraproject.org> -
0.18.0.git20090614.5
- Rebuild for stabs debug symbols

--

As you can see I managed to get libstdcxx compiled with x86_64 support.
At the same time, I managed to merge the x86_64 and i686 versions of gcc
together, so 'i686-apple-darwin9-gcc test.c -o test -m64' should work
now as well.

Another issue which is now 'fixed' is support for debug symbols. By
default, gcc uses DWARF debug symbols. However, on OSX this requires a
tool called dsymutil which isn't open sourced by Apple.. So I worked
around this by using STABS debug symbols (when using the
%{_darwinx_configure} macro while building packages) by using '-gstabs'
instead of the regular '-g'. I just tested this on OSX and it seems to
work just fine.

> Ordinarily, as far as I know, libstdc++ is build during GCC
> stage2 compilation:
> http://dev.gentoo.org/~vapier/CROSS-COMPILE-GUTS

Yes that's right for the regular gcc, but Apple decided to distribute
libstdcxx as a seperate tarball instead of being integrated in gcc.

I'm currently rebuilding all the other darwinx packages to have proper
debug symbols and x86_64 support so new packages will appear in the
testing repository soon.

Regards,

Erik van Pienbroek




More information about the mingw mailing list