Cross-compiling llvm/clang osx -> win32

Hi,

I'm trying to compile llvm/clang so that: it is compiled on osx 10.6, it runs on osx, but it outputs win32 objects.

More exactly, I'm building an app which generates a .c file that doesn't include or link with anything, and I'd like to be able to make a win32 .dll of it on osx.

Below is what I'm getting. Full log is here:
http://pastebin.com/KsPGvAfW

It fails while building compiler-rt.

Any hints on how I could accomplish this ?

Regards,
Antoine M.

Antonie,

I wonder you would need pecoff-aware binutils.
That said, I have not tried building compiler-rt as cross-build
targetting to Win32.

You might attempt;

  - Obtain mingw32-cross binutils, i686-pc-mingw32-XXX.
  - Build the tree with --target=i686-pc-mingw32.

I will attempt such a configuration later.

...Takumi