[LLVMdev] mingw build problems

Jay Foad jay.foad at gmail.com
Fri Apr 17 12:39:31 PDT 2009

>> but I don't understand what they are for. Do they let lli execute
>> programs in which the compiler has hard-coded calls to __eprintf? Does
>> that mean that __eprintf ought to be found in libgcc?
> Yes. And I believe it was there, at least for "official mingw gcc",
> which is 3.4.5. Could you please investigate why you don't have this
> in your libgcc? Is it gcc v3 vs v4 issue?

GCC's gcc/configure has this logic:

# If this is using newlib, without having the headers available now,
# then define inhibit_libc in LIBGCC2_CFLAGS.
# This prevents libgcc2 from containing any code which requires libc
# support.
if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
       test x$with_newlib = xyes ; } &&
     { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then

Debian's mingw32 package is built with host != target, and without the
--with-sysroot and --with-headers options. So this logic kicks in, and
prevents __eprintf from being built in libgcc.a, since it calls into

>From this discussion:


it sounds like only code built with GCC 2.x will refer to __eprintf.


More information about the llvm-dev mailing list