With fairly recent svn: ln -s libgcc.map libgcc.map.def && if [ ! -d ./shlib ]; then mkdir ./shlib else true; fi && ccache /obj/gcc.6/i686-pc-cygwin/i686-pc-cygwin/./gcc/xgcc -B/obj/gc c.6/i686-pc-cygwin/i686-pc-cygwin/./gcc/ -B/usr/local/i686-pc-cygwin/bin/ -B/usr /local/i686-pc-cygwin/lib/ -isystem /usr/local/i686-pc-cygwin/include -isystem / usr/local/i686-pc-cygwin/sys-include -I/src/gccsvn/gcc/../winsup/w32api/include -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -isystem ./include -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -shared -nodefaultlibs libgcc.map.def -Wl ,--out-implib,./shlib/libgcc_s.a.tmp -o ./shlib/libgcc_s_1.dll.tmp -g -B./ _chks tk_s.o _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s. o _ucmpdi2_s.o _clear_cache_s.o _enable_execute_stack_s.o _trampoline_s.o __main _s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s .o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _f fsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab _s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s. o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _mu ltc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2 _s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _ fixxfdi_s.o _fixtfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _fixuns tfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatditf_s.o _floatundis f_s.o _floatundidf_s.o _floatundixf_s.o _floatunditf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o unwind-dw2_s.o unwin d-dw2-fde_s.o unwind-sjlj_s.o gthr-gnat_s.o unwind-c_s.o emutls_s.o -luser32 -lk ernel32 -ladvapi32 -lshell32 && ar -r ./shlib/libgcc_s.a.tmp _chkstk.o _ctors.o gthr-win32.o && if [ -f ./shlib/libgcc_s_1.dll ]; then mv -f ./shlib/libgcc_s_1. dll ./shlib/libgcc_s_1.dll.backup; else true; fi && mv ./shlib/libgcc_s_1.dll.tm p ./shlib/libgcc_s_1.dll && mv ./shlib/libgcc_s.a.tmp ./shlib/libgcc_s.a Creating library file: ./shlib/libgcc_s.a.tmp /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: warning: ca nnot find entry symbol [EMAIL PROTECTED]; defaulting to 10001000 _absvsi2_s.o: In function `__absvsi2': /src/gccsvn/libgcc/../gcc/libgcc2.c:237: undefined reference to `_abort' _absvdi2_s.o: In function `__absvdi2': /src/gccsvn/libgcc/../gcc/libgcc2.c:276: undefined reference to `_abort' _addvsi3_s.o: In function `__addvsi3': /src/gccsvn/libgcc/../gcc/libgcc2.c:90: undefined reference to `_abort' _addvdi3_s.o: In function `__addvdi3': /src/gccsvn/libgcc/../gcc/libgcc2.c:115: undefined reference to `_abort' _subvsi3_s.o: In function `__subvsi3': /src/gccsvn/libgcc/../gcc/libgcc2.c:128: undefined reference to `_abort' _subvdi3_s.o:/src/gccsvn/libgcc/../gcc/libgcc2.c:153: more undefined references to `_abort' follow unwind-dw2-fde_s.o: In function `__gthread_mutex_lock': /src/gccsvn/libgcc/../gcc/gthr-posix.h:760: undefined reference to `_pthread_mut ex_lock' unwind-dw2-fde_s.o: In function `__gthread_mutex_unlock': /src/gccsvn/libgcc/../gcc/gthr-posix.h:792: undefined reference to `_pthread_mut ex_unlock' unwind-dw2-fde_s.o: In function `__register_frame': /src/gccsvn/libgcc/../gcc/unwind-dw2-fde.c:119: undefined reference to `_malloc'
unwind-dw2-fde_s.o: In function `__register_frame_table': /src/gccsvn/libgcc/../gcc/unwind-dw2-fde.c:157: undefined reference to `_malloc' unwind-dw2-fde_s.o: In function `__deregister_frame_info_bases': /src/gccsvn/libgcc/../gcc/unwind-dw2-fde.c:201: undefined reference to `_free' unwind-dw2-fde_s.o: In function `__deregister_frame': /src/gccsvn/libgcc/../gcc/unwind-dw2-fde.c:232: undefined reference to `_free' unwind-dw2-fde_s.o: In function `base_from_object': /src/gccsvn/libgcc/../gcc/unwind-dw2-fde.c:257: undefined reference to `_abort' unwind-dw2-fde_s.o: In function `get_cie_encoding': /src/gccsvn/libgcc/../gcc/unwind-dw2-fde.c:276: undefined reference to `_strlen' unwind-dw2-fde_s.o: In function `start_fde_sort': /src/gccsvn/libgcc/../gcc/unwind-dw2-fde.c:401: undefined reference to `_malloc' /src/gccsvn/libgcc/../gcc/unwind-dw2-fde.c:404: undefined reference to `_malloc' unwind-dw2-fde_s.o: In function `end_fde_sort': /src/gccsvn/libgcc/../gcc/unwind-dw2-fde.c:582: undefined reference to `_free' unwind-sjlj_s.o: In function `__gthread_once': /src/gccsvn/libgcc/../gcc/gthr-posix.h:718: undefined reference to `_pthread_onc e' unwind-sjlj_s.o: In function `__gthread_key_create': /src/gccsvn/libgcc/../gcc/gthr-posix.h:726: undefined reference to `_pthread_key _create' unwind-sjlj_s.o: In function `__gthread_getspecific': /src/gccsvn/libgcc/../gcc/gthr-posix.h:738: undefined reference to `_pthread_get specific' unwind-sjlj_s.o: In function `__gthread_setspecific': /src/gccsvn/libgcc/../gcc/gthr-posix.h:744: undefined reference to `_pthread_set specific' unwind-c_s.o: In function `base_of_encoded_value': /src/gccsvn/libgcc/../gcc/unwind-pe.h:125: undefined reference to `_abort' unwind-c_s.o: In function `read_encoded_value_with_base': /src/gccsvn/libgcc/../gcc/unwind-pe.h:262: undefined reference to `_abort' emutls_s.o: In function `__gthread_once': /src/gccsvn/libgcc/../gcc/gthr-posix.h:718: undefined reference to `_pthread_onc e' emutls_s.o: In function `__gthread_key_create': /src/gccsvn/libgcc/../gcc/gthr-posix.h:726: undefined reference to `_pthread_key _create' emutls_s.o: In function `__gthread_getspecific': /src/gccsvn/libgcc/../gcc/gthr-posix.h:738: undefined reference to `_pthread_get specific' emutls_s.o: In function `__gthread_setspecific': /src/gccsvn/libgcc/../gcc/gthr-posix.h:744: undefined reference to `_pthread_set specific' emutls_s.o: In function `__gthread_mutex_lock': /src/gccsvn/libgcc/../gcc/gthr-posix.h:760: undefined reference to `_pthread_mut ex_lock' emutls_s.o: In function `__gthread_mutex_unlock': /src/gccsvn/libgcc/../gcc/gthr-posix.h:792: undefined reference to `_pthread_mut ex_unlock' emutls_s.o: In function `emutls_destroy': /src/gccsvn/libgcc/../gcc/emutls.c:76: undefined reference to `_free' /src/gccsvn/libgcc/../gcc/emutls.c:79: undefined reference to `_free' emutls_s.o: In function `emutls_init': /src/gccsvn/libgcc/../gcc/emutls.c:89: undefined reference to `_abort' emutls_s.o: In function `emutls_alloc': /src/gccsvn/libgcc/../gcc/emutls.c:103: undefined reference to `_malloc' /src/gccsvn/libgcc/../gcc/emutls.c:105: undefined reference to `_abort' /src/gccsvn/libgcc/../gcc/emutls.c:111: undefined reference to `_malloc' /src/gccsvn/libgcc/../gcc/emutls.c:113: undefined reference to `_abort' /src/gccsvn/libgcc/../gcc/emutls.c:120: undefined reference to `_memcpy' /src/gccsvn/libgcc/../gcc/emutls.c:122: undefined reference to `_memset' emutls_s.o: In function `__emutls_get_address': /src/gccsvn/libgcc/../gcc/emutls.c:156: undefined reference to `_calloc' /src/gccsvn/libgcc/../gcc/emutls.c:158: undefined reference to `_abort' /src/gccsvn/libgcc/../gcc/emutls.c:168: undefined reference to `_realloc' /src/gccsvn/libgcc/../gcc/emutls.c:170: undefined reference to `_abort' /src/gccsvn/libgcc/../gcc/emutls.c:172: undefined reference to `_memset' collect2: ld returned 1 exit status make[1]: *** [libgcc_s.dll] Error 1 make[1]: Leaving directory `/obj/gcc.6/i686-pc-cygwin/i686-pc-cygwin/i686-pc-cyg win/libgcc' make: *** [all-target-libgcc] Error 2 if you cd to this directory again and type make you get: ln: creating symbolic link `libgcc.map.def': File exists I thought the convention for using ln in builds was to use -f. ? $ more /obj/gcc.6/i686-pc-cygwin/i686-pc-cygwin/config.log $ /src/gccsvn/configure -host i686-pc-cygwin -target i686-pc-cygwin -verbose - prefix=/usr/local -exec-prefix=/usr/local -libdir=/usr/local/lib -libexecdir=/us r/local/lib -mandir=/usr/local/share/man -infodir=/usr/local/share/info -disable -nls -disable-intl -disable-po -with-gnu-as -with-gnu-ld -disable-bootstrap -ena ble-rpath -enable-cld -enable-version-specific-runtime-libs -disable-checking -d isable-win32-registry -enable-64-bit-bfd -disable-libgomp -disable-libssp -enabl e-languages=c,c++ -enable-threads=posix CFLAGS=-g CFLAGS_FOR_BUILD=-g BOOT_CFLAG S=-g CXXFLAGS=-g CXXFLAGS_FOR_BUILD=-g FCFLAGS=-g GNATLIBCFLAGS=-g STAGE_CC_WRAP PER=ccache CC=ccache gcc I also tried just -enable-threads, without the "=posix". Hm, this build was not "merged" with binutils, nor winsup/cygwin. Fixed by adding -lc and -lpthread, and being sure to do so before -lkernel32. Or maybe a merged tree will do. I know I know, 1) that's a heck of a gnarly configure line 2) mainly just missing "libc" in there, somehow. To be investigated... or I could just do -disable-share or -without-share=gcc or whatever.. which would also fix a problem on Solaris where 32bit and 64bit library paths get confused... and then from a 4.3.2 slightly patched tree: libtool: compile: /obj/gcc.4/./gcc/xgcc -shared-libgcc -B/obj/gcc.4/./gcc -nost dinc++ -L/obj/gcc.4/i686-pc-cygwin/libstdc++-v3/src -L/obj/gcc.4/i686-pc-cygwin/ libstdc++-v3/src/.libs -L/obj/gcc.4/i686-pc-cygwin/winsup -L/obj/gcc.4/i686-pc-c ygwin/winsup/cygwin -L/obj/gcc.4/i686-pc-cygwin/winsup/w32api/lib -isystem /src/ gcc/winsup/include -isystem /src/gcc/winsup/cygwin/include -isystem /src/gcc/win sup/w32api/include -nostdinc -B/obj/gcc.4/i686-pc-cygwin/newlib/ -isystem /obj/g cc.4/i686-pc-cygwin/newlib/targ-include -isystem /src/gcc/newlib/libc/include -B /usr/local/i686-pc-cygwin/bin/ -B/usr/local/i686-pc-cygwin/lib/ -isystem /usr/lo cal/i686-pc-cygwin/include -isystem /usr/local/i686-pc-cygwin/sys-include -L/obj /gcc.4/./ld -DHAVE_CONFIG_H -I. -I/src/gcc/libjava -I./include -I./gcj -I/src/gc c/libjava -Iinclude -I/src/gcc/libjava/include -I/src/gcc/libjava/classpath/incl ude -Iclasspath/include -I/src/gcc/libjava/classpath/native/fdlibm -I/src/gcc/li bjava/../boehm-gc/include -I../boehm-gc/include -I/src/gcc/libjava/.././libjava/ ../gcc -I/src/gcc/libjava/../zlib -I/src/gcc/libjava/../libffi/include -I../libf fi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enu m -D_FILE_OFFSET_BITS=64 -ffloat-store -fomit-frame-pointer -Usun -Wextra -Wall -D_GNU_SOURCE -DPREFIX=\"/usr/local\" -DTOOLEXECLIBDIR=\"/usr/local/lib/gcc/i686 -pc-cygwin/4.3.2\" -DJAVA_HOME=\"/usr/local\" -DBOOT_CLASS_PATH=\"/usr/local/sha re/java/libgcj-4.3.2.jar\" -DJAVA_EXT_DIRS=\"/usr/local/share/java/ext\" -DGCJ_E NDORSED_DIRS=\"/usr/local/share/java/gcj-endorsed\" -DGCJ_VERSIONED_LIBDIR=\"/us r/local/lib/gcj-4.3.2-9\" -DPATH_SEPARATOR=\":\" -DECJ_JAR_FILE=\"\" -DLIBGCJ_DE FAULT_DATABASE=\"/usr/local/lib/gcj-4.3.2-9/classmap.db\" -DLIBGCJ_DEFAULT_DATAB ASE_PATH_TAIL=\"gcj-4.3.2-9/classmap.db\" -O2 -g -g -O2 -MT java/net/natVMInetAd dress.lo -MD -MP -MF java/net/.deps/natVMInetAddress.Tpo -c java/net/natVMInetAd dress.cc -DDLL_EXPORT -DPIC -o java/net/.libs/natVMInetAddress.o java/net/natVMInetAddress.cc:42: error: declaration of C function 'int gethostna me(char*, int)' conflicts with /src/gcc/newlib/libc/include/sys/unistd.h:227: error: previous declaration 'int gethostname(char*, size_t)' here make[3]: *** [java/net/natVMInetAddress.lo] Error 1 make[3]: Leaving directory `/obj/gcc.4/i686-pc-cygwin/libjava' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/obj/gcc.4/i686-pc-cygwin/libjava' make[1]: *** [all-target-libjava] Error 2 make[1]: Leaving directory `/obj/gcc.4' make: *** [all] Error 2 [EMAIL PROTECTED] /obj/gcc.4 $ more /obj/gcc.4/config.log $ /src/gcc/configure -disable-nls STAGE_CC_WRAPPER=ccache -prefix=/usr/local - exec-prefix=/usr/local -libdir=/usr/local/lib -libexecdir=/usr/local/lib -mandir =/usr/local/share/man -infodir=/usr/local/share/info -enable-languages=c,c++,for tran,java,objc,obj-c++ -disable-nls -without-included-gettext -enable-version-sp ecific-runtime-libs -without-x -enable-libgcj -disable-java-awt -with-system-zli b -enable-interpreter -disable-libgcj-debug -enable-threads=posix -enable-java-g c=boehm -disable-win32-registry -enable-sjlj-exceptions -enable-hash-synchroniza tion -enable-libstdcxx-debug Probably the right fix here is some configury to look for the declaration of gethostname and if it is found, be sure to #include where it is found, and not declare it one's self? - Jay