I'm trying to build gcc 7.1 under cygwin32. Older versions like 6.3 worked, but for 7.1 I'm getting: undefined reference to `___divmoddi4' This happens when I call "make install", because make went fine. Any ideas what I'm missing, I could not find anything relevant? TIA log: make[1]: Entering directory '/cygdrive/f/buildgcc710' /bin/sh ../gcc-7.1.0/mkinstalldirs /usr/local /usr/local make[2]: Entering directory '/cygdrive/f/buildgcc710/fixincludes' rm -rf /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/install-tools /bin/sh ../../gcc-7.1.0/fixincludes/../mkinstalldirs /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/install-tools mkdir -p -- /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/install-tools /bin/sh ../../gcc-7.1.0/fixincludes/../mkinstalldirs /usr/local/lib/gcc/i686-pc-cygwin/7.1.0/install-tools/include /usr/bin/install -c -m 644 ../../gcc-7.1.0/fixincludes/README-fixinc \ /usr/local/lib/gcc/i686-pc-cygwin/7.1.0/install-tools/include/README /usr/bin/install -c fixinc.sh /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/install-tools/fixinc.sh /usr/bin/install -c fixincl.exe /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/install-tools/fixincl.exe /usr/bin/install -c mkheaders /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/install-tools/mkheaders make[2]: Leaving directory '/cygdrive/f/buildgcc710/fixincludes' make[2]: Entering directory '/cygdrive/f/buildgcc710/lto-plugin' make[3]: Entering directory '/cygdrive/f/buildgcc710/lto-plugin' /usr/bin/mkdir -p '/usr/local/libexec/gcc/i686-pc-cygwin/7.1.0' /bin/sh ./libtool --tag=disable-static --mode=install /usr/bin/install -c liblto_plugin.la '/usr/local/libexec/gcc/i686-pc-cygwin/7.1.0' libtool: install: /usr/bin/install -c .libs/liblto_plugin.dll.a /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/liblto_plugin.dll.a libtool: install: base_file=`basename liblto_plugin.la` libtool: install: dlpath=`/bin/sh 2>&1 -c '. .libs/'liblto_plugin.la'i; echo cyglto_plugin-0.dll'` libtool: install: dldir=/usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/`dirname cyglto_plugin-0.dll` libtool: install: test -d /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/. || mkdir -p /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/. libtool: install: /usr/bin/install -c .libs/cyglto_plugin-0.dll /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/./cyglto_plugin-0.dll libtool: install: chmod a+x /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/./cyglto_plugin-0.dll libtool: install: if test -n '' && test -n 'strip --strip-unneeded'; then eval 'strip --strip-unneeded /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/./cyglto_plugin-0.dll' || exit 0; fi libtool: install: /usr/bin/install -c .libs/liblto_plugin.lai /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0/liblto_plugin.la ---------------------------------------------------------------------- Libraries have been installed in: /usr/local/libexec/gcc/i686-pc-cygwin/7.1.0 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-LLIBDIR' linker flag See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- make[3]: Nothing to be done for 'install-data-am'. make[3]: Leaving directory '/cygdrive/f/buildgcc710/lto-plugin' make[2]: Leaving directory '/cygdrive/f/buildgcc710/lto-plugin' make[2]: Entering directory '/cygdrive/f/buildgcc710/gcc' build/genmddeps.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md > tmp-mddeps /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-mddeps mddeps.mk echo timestamp > s-mddeps build/genmodes.exe -h > tmp-modes.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-modes.h insn-modes.h echo timestamp > s-modes-h build/gengtype.exe \ -S ../../gcc-7.1.0/gcc -I gtyp-input.list -w tmp-gtype.state /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-gtype.state gtype.state build/gengtype.exe \ -r gtype.state echo timestamp > s-gtype build/genconstants.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ > tmp-constants.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-constants.h insn-constants.h echo timestamp > s-constants build/gengenrtl.exe > tmp-genrtl.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-genrtl.h genrtl.h echo timestamp > s-genrtl-h build/genmodes.exe -m > tmp-min-modes.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-min-modes.c min-insn-modes.c echo timestamp > s-modes-m build/genpreds.exe -h ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md > tmp-preds.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-preds.h tm-preds.h echo timestamp > s-preds-h build/genconditions.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md > tmp-condmd.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-condmd.c build/gencondmd.c echo timestamp > s-conditions build/genpreds.exe -c ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md > tmp-constrs.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-constrs.h tm-constrs.h echo timestamp > s-constrs-h build/gencondmd.exe > tmp-cond.md /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-cond.md insn-conditions.md echo timestamp > s-condmd build/genflags.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-flags.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-flags.h insn-flags.h echo timestamp > s-flags build/genattr.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-attr.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-attr.h insn-attr.h echo timestamp > s-attr build/genattr-common.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-attr-common.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-attr-common.h insn-attr-common.h echo timestamp > s-attr-common build/gencodes.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-codes.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-codes.h insn-codes.h echo timestamp > s-codes build/genconfig.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-config.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-config.h insn-config.h echo timestamp > s-config build/gentarget-def.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-target-def.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-target-def.h insn-target-def.h echo timestamp > s-target-def build/gencheck.exe > tmp-check.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-check.h tree-check.h echo timestamp > s-check build/gcov-iov.exe '7.1.0' '' \ > tmp-gcov-iov.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-gcov-iov.h gcov-iov.h echo timestamp > s-iov build/genhooks.exe "Target Hook" \ > tmp-target-hooks-def.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-target-hooks-def.h \ target-hooks-def.h echo timestamp > s-target-hooks-def-h build/genopinit.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md -htmp-opinit.h -ctmp-opinit.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-opinit.h insn-opinit.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-opinit.c insn-opinit.c echo timestamp > s-opinit build/genhooks.exe "Common Target Hook" \ > tmp-common-target-hooks-def.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-common-target-hooks-def.h \ common/common-target-hooks-def.h echo timestamp > s-common-target-hooks-def-h build/genhooks.exe "C Target Hook" \ > tmp-c-target-hooks-def.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-c-target-hooks-def.h \ c-family/c-target-hooks-def.h echo timestamp > s-c-target-hooks-def-h build/gencfn-macros.exe -c \ > tmp-case-cfn-macros.h /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-case-cfn-macros.h \ case-cfn-macros.h echo timestamp > s-case-cfn-macros build/gencfn-macros.exe -o \ > tmp-cfn-operators.pd /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-cfn-operators.pd \ cfn-operators.pd echo timestamp > s-cfn-operators build/genmatch.exe --gimple ../../gcc-7.1.0/gcc/match.pd \ > tmp-gimple-match.c GIMPLE decision tree has 1882 leafs, maximum depth 12 and a total number of 7473 nodes removed 1098 duplicate tails build/genmatch.exe --generic ../../gcc-7.1.0/gcc/match.pd \ > tmp-generic-match.c GENERIC decision tree has 1840 leafs, maximum depth 12 and a total number of 7247 nodes removed 1059 duplicate tails /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-gimple-match.c \ gimple-match.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-generic-match.c \ generic-match.c echo timestamp > s-match build/genattrtab.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md insn-conditions.md \ -Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-attrtab.c insn-attrtab.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-dfatab.c insn-dfatab.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-latencytab.c insn-latencytab.c echo timestamp > s-attrtab build/genautomata.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-automata.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-automata.c insn-automata.c echo timestamp > s-automata build/genemit.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-emit.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-emit.c insn-emit.c echo timestamp > s-emit build/genextract.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-extract.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-extract.c insn-extract.c echo timestamp > s-extract build/genmodes.exe > tmp-modes.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-modes.c insn-modes.c echo timestamp > s-modes build/genoutput.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-output.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-output.c insn-output.c echo timestamp > s-output build/genpeep.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-peep.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-peep.c insn-peep.c echo timestamp > s-peep build/genpreds.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md > tmp-preds.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-preds.c insn-preds.c echo timestamp > s-preds build/genrecog.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ insn-conditions.md > tmp-recog.c Statistics for recog: Number of decisions: 37869 longest path: 360 (code: 3474) longest backtrack: 23 (code: 4188) Statistics for split_insns: Number of decisions: 2360 longest path: 70 (code: 371) longest backtrack: 15 (code: 319) Statistics for peephole2_insns: Number of decisions: 1315 longest path: 205 (code: 67) longest backtrack: 16 (code: 143) Shared 28152 out of 56490 states by creating 7562 new states, saving 20590 /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-recog.c insn-recog.c echo timestamp > s-recog build/genenums.exe ../../gcc-7.1.0/gcc/common.md ../../gcc-7.1.0/gcc/config/i386/i386.md \ > tmp-enums.c /bin/sh ../../gcc-7.1.0/gcc/../move-if-change tmp-enums.c insn-enums.c echo timestamp > s-enums if [ -f ../stage_final ] \ && cmp -s ../stage_current ../stage_final; then \ cp ../prev-gcc/cc1-checksum.c cc1-checksum.c; \ else \ build/genchecksum.exe c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-array-notation.o c/c-fold.o c/gimple-parser.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o c-family/c-attribs.o c-family/c-warn.o i386-c.o msformat-c.o default-c.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a ../libbacktrace/.libs/libbacktrace.a \ checksum-options > cc1-checksum.c.tmp && \ ../../gcc-7.1.0/gcc/../move-if-change cc1-checksum.c.tmp cc1-checksum.c; \ fi g++ -std=gnu++98 -fno-PIE -c -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc-7.1.0/gcc -I../../gcc-7.1.0/gcc/. -I../../gcc-7.1.0/gcc/../include -I../../gcc-7.1.0/gcc/../libcpp/include -I/usr/local/include -I../../gcc-7.1.0/gcc/../libdecnumber -I../../gcc-7.1.0/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc-7.1.0/gcc/../libbacktrace -o cc1-checksum.o -MT cc1-checksum.o -MMD -MP -MF ./.deps/cc1-checksum.TPo cc1-checksum.c g++ -std=gnu++98 -no-pie -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -Wl,--stack,12582912 -o cc1.exe c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-array-notation.o c/c-fold.o c/gimple-parser.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o c-family/c-attribs.o c-family/c-warn.o i386-c.o msformat-c.o default-c.o \ cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a -lintl -liconv ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lisl -L/usr/local/lib -lmpc -lmpfr -lgmp -L./../zlib -lz c-family/c-pretty-print.o: In function `_Z12tree_to_shwiPK9tree_node': /cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/tree.h:4121: undefined reference to `___divmoddi4' cfgloopmanip.o: In function `set_zero_probability': /cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/cfgloopmanip.c:1114: undefined reference to `___divmoddi4' expr.o: In function `emit_group_load_1': /cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/expr.c:2178: undefined reference to `___divmoddi4' fold-const.o: In function `fold_plusminus_mult_expr': /cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/fold-const.c:6967: undefined reference to `___divmoddi4' tree-sra.o: In function `build_user_friendly_ref_for_offset': /cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/tree-sra.c:1843: undefined reference to `___divmoddi4' tree-ssa-loop-prefetch.o:/cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/tree-ssa-loop-prefetch.c:854: more undefined references to `___divmoddi4' follow collect2: error: ld returned 1 exit status make[2]: *** [../../gcc-7.1.0/gcc/c/Make-lang.in:85: cc1.exe] Error 1 make[2]: Leaving directory '/cygdrive/f/buildgcc710/gcc' make[1]: *** [Makefile:4878: install-gcc] Error 2 make[1]: Leaving directory '/cygdrive/f/buildgcc710' make: *** [Makefile:2326: install] Error 2 -- mfg Thomas