This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mingw32 target broken [cygwin as well] [the saga continues]



Jeff Sturm <jsturm@one-point.com> writes:
> A dirty little secret: if all you want is the java runtime, you can skip
> building libstdc++.  Just remove it from the toplevel Makefile.
> 
> Unfortunately, libjava assumes cross compilers target newlib, just as
> libstdc++ does...
> 
> if test -n "${with_cross_host}"; then
>    # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
>    # may not work correctly, because the compiler may not be able to
>    # link executables.
> 
>    # We assume newlib.  This lets us hard-code the functions we know
>    # we'll have.


Okay, I think I've worked around this for libstdc++-v3... can somebody
with more gcc-hacking experience let me know if this is too kludgey to
submit to gcc-patches@gcc.gnu.org?

I basically just special-cased out mingw32 with the stuff that I know
it doesn't have (said knowledge was acquired by the highly scientific
process of trial and error until it built). I'd like to do a more
elegant job, but I don't really understand gcc's autoconf setup to
come up with anything cleaner.

I've also put this patch into http://www.xwt.org/creating.a.mingw.crosscompiler.html

  - a


Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.in,v
retrieving revision 1.79
diff -c -3 -p -r1.79 configure.in
*** configure.in	2001/12/03 22:28:57	1.79
--- configure.in	2001/12/10 04:28:53
*************** if test -n "$with_cross_host" || test x"
*** 124,129 ****
--- 124,132 ----
        AC_DEFINE(HAVE_SINCOS)
        AC_DEFINE(HAVE_SINCOSF)
        ;;
+     *-mingw*)
+       os_include_dir="config/os/mingw32"
+       ;;
      *)
        os_include_dir="config/os/newlib"
        AC_DEFINE(HAVE_HYPOT)
*************** if test -n "$with_cross_host" || test x"
*** 136,171 ****
    # AC_FUNC_MMAP
    AC_DEFINE(HAVE_MMAP)
  
!   AC_DEFINE(HAVE_ACOSF)
!   AC_DEFINE(HAVE_ASINF)
!   AC_DEFINE(HAVE_ATAN2F)
!   AC_DEFINE(HAVE_ATANF)
!   AC_DEFINE(HAVE_CEILF)
!   AC_DEFINE(HAVE_COPYSIGN)
!   AC_DEFINE(HAVE_COPYSIGNF)
!   AC_DEFINE(HAVE_COSF)
!   AC_DEFINE(HAVE_COSHF)
!   AC_DEFINE(HAVE_EXPF)
!   AC_DEFINE(HAVE_FABSF)
!   AC_DEFINE(HAVE_FINITE)
!   AC_DEFINE(HAVE_FINITEF)
!   AC_DEFINE(HAVE_FLOORF)
!   AC_DEFINE(HAVE_FMODF)
!   AC_DEFINE(HAVE_FREXPF)
!   AC_DEFINE(HAVE_ISINF)
!   AC_DEFINE(HAVE_ISINFF)
!   AC_DEFINE(HAVE_ISNAN)
!   AC_DEFINE(HAVE_ISNANF)
!   AC_DEFINE(HAVE_LDEXPF)
!   AC_DEFINE(HAVE_LOG10F)
!   AC_DEFINE(HAVE_LOGF)
!   AC_DEFINE(HAVE_MODFF)
!   AC_DEFINE(HAVE_POWF)
!   AC_DEFINE(HAVE_SINF)
!   AC_DEFINE(HAVE_SINHF)
!   AC_DEFINE(HAVE_SQRTF)
!   AC_DEFINE(HAVE_TANF)
!   AC_DEFINE(HAVE_TANHF)
  
    # At some point, we should differentiate between architectures
    # like x86, which have long double versions, and alpha/powerpc/etc.,
--- 139,179 ----
    # AC_FUNC_MMAP
    AC_DEFINE(HAVE_MMAP)
  
!   case "$target_alias" in
!     *-mingw*)
!       ;;
!     *)
!       AC_DEFINE(HAVE_ACOSF)
!       AC_DEFINE(HAVE_ASINF)
!       AC_DEFINE(HAVE_ATAN2F)
!       AC_DEFINE(HAVE_ATANF)
!       AC_DEFINE(HAVE_CEILF)
!       AC_DEFINE(HAVE_COPYSIGN)
!       AC_DEFINE(HAVE_COPYSIGNF)
!       AC_DEFINE(HAVE_COSF)
!       AC_DEFINE(HAVE_COSHF)
!       AC_DEFINE(HAVE_EXPF)
!       AC_DEFINE(HAVE_FABSF)
!       AC_DEFINE(HAVE_FINITE)
!       AC_DEFINE(HAVE_FINITEF)
!       AC_DEFINE(HAVE_FLOORF)
!       AC_DEFINE(HAVE_FMODF)
!       AC_DEFINE(HAVE_FREXPF)
!       AC_DEFINE(HAVE_ISINF)
!       AC_DEFINE(HAVE_ISINFF)
!       AC_DEFINE(HAVE_ISNAN)
!       AC_DEFINE(HAVE_ISNANF)
!       AC_DEFINE(HAVE_LDEXPF)
!       AC_DEFINE(HAVE_LOG10F)
!       AC_DEFINE(HAVE_LOGF)
!       AC_DEFINE(HAVE_MODFF)
!       AC_DEFINE(HAVE_POWF)
!       AC_DEFINE(HAVE_SINF)
!       AC_DEFINE(HAVE_SINHF)
!       AC_DEFINE(HAVE_SQRTF)
!       AC_DEFINE(HAVE_TANF)
!       AC_DEFINE(HAVE_TANHF)
!   esac
  
    # At some point, we should differentiate between architectures
    # like x86, which have long double versions, and alpha/powerpc/etc.,





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]