GCC 7.1, cygwin, undefined reference to ___divmoddi4
Xi Ruoyao
ryxi@stu.xidian.edu.cn
Mon May 8 05:23:00 GMT 2017
On 2017-05-08 10:13 +0800, Liu Hao wrote:
> On 2017/5/8 7:52, Thomas Plank wrote:
> > JonY wrote:
> > > Looks like something wrong with libgcc? Check the libgcc symbols from
> > > 7.1.0 and the installed version. Not sure if you can workaround by
> > > installing libgcc first.
> > >
> > I solved in in the way, that I took the oppurtunity to switch to
> > cygwin64 and start completely from scratch.
> > So my ~15 year old cygwin installation got refreshed.
> >
> > Compilation worked with the new setup without problems.
> >
> This function is used to divide two 64-bit integers on i686, but not onÂ
> x86_64 because of hardware support for 64-bit division. It is availableÂ
> in libgcc unless we are building the CRT (winpthreads is also sufferringÂ
> from this problem). I am not familiar with cygwin, but despite that IÂ
> think mingw-w64 could provide it.
According to Liu Hao's new thread, the symbol __divmoddi4 was introduced
in GCC 7.0. Â However it seems the building system used an old GCC version
to link the code generated by (stage 2) GCC 7.1. Â The code would be linked
to old libgcc without __divmoddi4.
Either this is a bootstrap bug, or Thomas did something wrong building
GCC.
--
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University
More information about the Gcc-help
mailing list