#580 Failure to build libgcc

v1.0 (example)
closed-invalid
nobody
None
5
2017-01-11
2017-01-10
FX
No

I am trying to build a cross-compiler from x86_64-apple-darwin16. I have the binutils, headers, crt, and compiler built and installed. But the GCC runtime libraries do not compile. Both the 32-bit and 64-bit libgcc fails to link with:

ln -s -f libgcc.map libgcc.map.def && if [ ! -d 32/shlib ]; then mkdir 32/shlib; else true; fi && /Users/fx/devel/mingw-w64/gcc-ibin2/./gcc/xgcc -B/Users/fx/devel/mingw-w64/gcc-ibin2/./gcc/ -L/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib -L/Users/fx/devel/mingw-w64/cross/mingw/lib -isystem /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/include -isystem /Users/fx/devel/mingw-w64/cross/mingw/include -B/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ -B/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/ -isystem /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/include -isystem /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/sys-include    -O2 -I../../../../gcc-src/libgcc/../winsup/w32api/include -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -shared -nodefaultlibs libgcc.map.def -Wl,--out-implib,32/shlib/libgcc_s.a.tmp -o 32/shlib/libgcc_s_sjlj-1.dll.tmp -g -O2 -m32 -B./ _chkstk_s.o _chkstk_ms_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 _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 _ffsdi2_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 _mulhc3_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divhc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o _udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o gthr-win32_s.o cpuinfo_s.o tf-signs_s.o sfp-exceptions_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a  -lmingwthrd -lmingw32 -lmingwex -lmoldname -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 && if [ -f 32/shlib/libgcc_s_sjlj-1.dll ]; then mv -f 32/shlib/libgcc_s_sjlj-1.dll 32/shlib/libgcc_s_sjlj-1.dll.backup; else true; fi && mv 32/shlib/libgcc_s_sjlj-1.dll.tmp 32/shlib/libgcc_s_sjlj-1.dll && mv 32/shlib/libgcc_s.a.tmp 32/shlib/libgcc_s.a
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwthrd.a when searching for -lmingwthrd
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwthrd.a when searching for -lmingwthrd
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmingwthrd.a when searching for -lmingwthrd
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmingwthrd.a when searching for -lmingwthrd
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwthrd.a when searching for -lmingwthrd
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwthrd.a when searching for -lmingwthrd
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwthrd.a when searching for -lmingwthrd
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmingwthrd.a when searching for -lmingwthrd
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwthrd.a when searching for -lmingwthrd
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: cannot find -lmingwthrd
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmingw32.a when searching for -lmingw32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmingw32.a when searching for -lmingw32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmingw32.a when searching for -lmingw32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: cannot find -lmingw32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmingwex.a when searching for -lmingwex
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmingwex.a when searching for -lmingwex
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmingwex.a when searching for -lmingwex
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmingwex.a when searching for -lmingwex
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: cannot find -lmingwex
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldname
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldname
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmoldname.a when searching for -lmoldname
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmoldname.a when searching for -lmoldname
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldname
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldname
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldname
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmoldname.a when searching for -lmoldname
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmoldname.a when searching for -lmoldname
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: cannot find -lmoldname
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmsvcrt.a when searching for -lmsvcrt
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmsvcrt.a when searching for -lmsvcrt
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libmsvcrt.a when searching for -lmsvcrt
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: cannot find -lmsvcrt
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libadvapi32.a when searching for -ladvapi32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libadvapi32.a when searching for -ladvapi32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libadvapi32.a when searching for -ladvapi32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libadvapi32.a when searching for -ladvapi32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libadvapi32.a when searching for -ladvapi32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libadvapi32.a when searching for -ladvapi32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libadvapi32.a when searching for -ladvapi32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libadvapi32.a when searching for -ladvapi32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libadvapi32.a when searching for -ladvapi32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: cannot find -ladvapi32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libshell32.a when searching for -lshell32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libshell32.a when searching for -lshell32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libshell32.a when searching for -lshell32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libshell32.a when searching for -lshell32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libshell32.a when searching for -lshell32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libshell32.a when searching for -lshell32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libshell32.a when searching for -lshell32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libshell32.a when searching for -lshell32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libshell32.a when searching for -lshell32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: cannot find -lshell32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libuser32.a when searching for -luser32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libuser32.a when searching for -luser32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libuser32.a when searching for -luser32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libuser32.a when searching for -luser32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libuser32.a when searching for -luser32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libuser32.a when searching for -luser32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libuser32.a when searching for -luser32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libuser32.a when searching for -luser32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libuser32.a when searching for -luser32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: cannot find -luser32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libkernel32.a when searching for -lkernel32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libkernel32.a when searching for -lkernel32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libkernel32.a when searching for -lkernel32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libkernel32.a when searching for -lkernel32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libkernel32.a when searching for -lkernel32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libkernel32.a when searching for -lkernel32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libkernel32.a when searching for -lkernel32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/mingw/lib/libkernel32.a when searching for -lkernel32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: skipping incompatible /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/lib/libkernel32.a when searching for -lkernel32
/Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: cannot find -lkernel32
collect2: error: ld returned 1 exit status
make[4]: *** [libgcc_s.dll] Error 1
make[3]: *** [multi-do] Error 1
make[2]: *** [all-multi] Error 2
make[1]: *** [all-target-libgcc] Error 2
make: *** [all] Error 2

I have the compiler configured like this: ../gcc-src/configure --prefix=/Users/fx/devel/mingw-w64/cross --with-sysroot=/Users/fx/devel/mingw-w64/cross --with-gmp=/Users/fx/devel/gcc/deps-static/x86_64 --disable-werror --target=x86_64-w64-mingw32 --enable-targets=all

Discussion

  • FX

    FX - 2017-01-10

    Upon looking deeper, it's only the 32-bit libgcc that fails (but it won't build the 64-bit one once that 32-bit has failed). It is looking for its libraries in lib (to which lib64 is symlinked) instead of lib32.

     
  • Jonathan Yong

    Jonathan Yong - 2017-01-10
    • status: open --> closed-invalid
     
  • Jonathan Yong

    Jonathan Yong - 2017-01-10

    /Users/fx/devel/mingw-w64/cross/x86_64-w64-mingw32/bin/ld: cannot find -lkernel32

    You did not build the 32bit CRT. Please use --disable-nmultilib or download a prebuilt binary.

     
  • FX

    FX - 2017-01-11

    Yes I did build the 32-bit CRT. My CRT was configured with ../mingw-w64-git/mingw-w64-crt/configure --prefix=$ROOT/cross/x86_64-w64-mingw32 --with-sysroot=$ROOT/cross/x86_64-w64-mingw32 --enable-lib32 --enable-lib64 --host=x86_64-w64-mingw32. It successfully built both 32 and 64-bit variants, which were then installed in the correct lib and lib32 directories.

    For some reason, though, the GCC build does not pick them up :(
    I have pasted in my report the GCC configure line, which I believe is correct:

    ../gcc-src/configure --prefix=/Users/fx/devel/mingw-w64/cross --with-sysroot=/Users/fx/devel/mingw-w64/cross --with-gmp=/Users/fx/devel/gcc/deps-static/x86_64 --disable-werror --target=x86_64-w64-mingw32 --enable-targets=all

     
  • FX

    FX - 2017-01-11

    (I don't believe I can reopen the bug report myself… could you reopen it please?)

     
  • FX

    FX - 2017-01-11

    I can reproduce it with GCC 6.3.0, and mingw-w64 5.0.1

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks