Due to libtool/gcc related problems I tried building a cross compiler linux->cygwin. The C compiler works fine, but the c++ compiler has three small problems * libstdc++-v3/crossconfig.m4 is missing an entry for cygwin * libstdc++-v3/configure.ac defines GCC_NO_EXECUTABLES, which in turn forbids linking checks (why?), which breaks during configuring * there's a compile error wrt fseeko64 and ftello64 (that's why cygwin is CC'd), see error log Using the patch below, the cross compiler builds fine, but I'm quite sure there are better fixes. Jan. --- libstdc++-v3/crossconfig.m4~ 2004-09-21 23:11:24 +0200 +++ libstdc++-v3/crossconfig.m4 2004-09-21 23:19:34 +0200 @@ -138,7 +138,7 @@ ;; esac ;; - *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) + *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu|*-cygwin*) AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ machine/endian.h machine/param.h sys/machine.h sys/types.h \ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h]) @@ -135,7 +151,7 @@ # For LFS. AC_DEFINE(HAVE_INT64_T) case "$target" in - *-uclinux*) + *-uclinux*|*-cygwin*) # Don't enable LFS with uClibc ;; *) --- libstdc++-v3/configure.ac~ 2004-09-22 10:08:58 +0200 +++ libstdc++-v3/configure.ac 2004-09-22 10:07:48 +0200 @@ -42,7 +42,8 @@ if test "$build" != "$host"; then # We are being configured with some form of cross compiler. GLIBCXX_IS_NATIVE=false - GCC_NO_EXECUTABLES + # no executables means no linking, nowadays? --jcn + # GCC_NO_EXECUTABLES else GLIBCXX_IS_NATIVE=true fi @@ -140,7 +140,8 @@ GLIBCXX_CHECK_INT64_T # For LFS support. - GLIBCXX_CHECK_LFS + # breaks Cygwin build --jcn + # GLIBCXX_CHECK_LFS AC_LC_MESSAGES /var/tmp/deb/gcc-i686-cygwin-3.4.1/build/gcc/xgcc -shared-libgcc -B/var/tmp/deb/gcc-i686-cygwin-3.4.1/build/gcc/ -nostdinc++ -L/var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3/src -L/var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3/src/.libs -B/usr/i686-cygwin/bin/ -B/usr/i686-cygwin/lib/ -isystem /usr/i686-cygwin/include -isystem /usr/i686-cygwin/sys-include -I/var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3/include/i686-cygwin -I/var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3/include -I/var/tmp/deb/gcc-i686-cygwin-3.4.1/src/libstdc++-v3/libsupc++ -DATTRIBUTE_NORETURN= -DATTRIBUTE_UNUSED= -I/cygwin/usr/include/w32api -L/cygwin/usr/lib/w32api -g -O2 -fno-implicit-templates -Wall -W -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c ../../../../src/libstdc++-v3/src/globals_io.cc -o globals_io.o ../../../../src/libstdc++-v3/src/globals_io.cc:1: warning: -ffunction-sections may affect debugging on some targets In file included from /var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3/include/i686-cygwin/bits/gthr.h:96, from ../../../../src/libstdc++-v3/src/globals_io.cc:29: /cygwin/usr/include/pthread.h:181: warning: weak declaration of 'int pthread_once(pthread_once_t*, void (*)())' not supported /cygwin/usr/include/pthread.h:145: warning: weak declaration of 'int pthread_key_create(__pthread_key_t**, void (*)(void*))' not supported /cygwin/usr/include/pthread.h:146: warning: weak declaration of 'int pthread_key_delete(__pthread_key_t*)' not supported /cygwin/usr/include/pthread.h:143: warning: weak declaration of 'void* pthread_getspecific(__pthread_key_t*)' not supported /cygwin/usr/include/pthread.h:192: warning: weak declaration of 'int pthread_setspecific(__pthread_key_t*, const void*)' not supported /cygwin/usr/include/pthread.h:138: warning: weak declaration of 'int pthread_create(__pthread_t**, __pthread_attr_t* const*, void*(*)(void*), void*)' not supported /cygwin/usr/include/pthread.h:152: warning: weak declaration of 'int pthread_mutex_lock(__pthread_mutex_t**)' not supported /cygwin/usr/include/pthread.h:154: warning: weak declaration of 'int pthread_mutex_trylock(__pthread_mutex_t**)' not supported /cygwin/usr/include/pthread.h:155: warning: weak declaration of 'int pthread_mutex_unlock(__pthread_mutex_t**)' not supported In file included from ../../../../src/libstdc++-v3/src/globals_io.cc:34: /var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3/include/ext/stdio_sync_filebuf.h: In member function `virtual std::streampos __gnu_cxx::stdio_sync_filebuf<_CharT, _Traits>::seekoff(std::streamoff, std::_Ios_Seekdir, std::_Ios_Openmode)': /var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3/include/ext/stdio_sync_filebuf.h:170: error: there are no arguments to `fseeko64' that depend on a template parameter, so a declaration of `fseeko64' must be available /var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3/include/ext/stdio_sync_filebuf.h:170: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) /var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3/include/ext/stdio_sync_filebuf.h:171: error: there are no arguments to `ftello64' that depend on a template parameter, so a declaration of `ftello64' must be available make[4]: *** [globals_io.lo] Error 1 make[4]: Leaving directory `/var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/deb/gcc-i686-cygwin-3.4.1/build/i686-cygwin/libstdc++-v3' make[1]: *** [all-target-libstdc++-v3] Error 2 make[1]: Leaving directory `/var/tmp/deb/gcc-i686-cygwin-3.4.1/build' make: *** [build-stamp] Error 2 debuild: fatal error at line 763: dpkg-buildpackage failed! -- Jan Nieuwenhuizen <janneke@xxxxxxx> | GNU LilyPond - The music typesetter http://www.xs4all.nl/~jantien | http://www.lilypond.org