Date: Wed, 24 Oct 2012 12:05:37 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Volodymyr Kostyrko <c.kworr@gmail.com> Cc: freebsd-stable@freebsd.org Subject: Re: wine, gcc and clang with CPUTYPE Message-ID: <5087BD71.9090002@FreeBSD.org> In-Reply-To: <50879F62.2010004@gmail.com> References: <50879F62.2010004@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2012-10-24 09:57, Volodymyr Kostyrko wrote: > I just have taken some time to inspect CPUTYPE support for clang. It > seems to me that clang generates incorrect code in some cases. > > The first failure point I discovered was inability to build gcc from > sources or compile something with gcc. Code produced by gcc seem to fail > whether this was gcc compiled from bootstrap or anything else: > > http://lists.freebsd.org/pipermail/freebsd-multimedia/2012-October/013469.html Can you attempt to figure out what the illegal instruction was, in that case? > I started testing by commenting out CPUTYPE in make.conf. After first > rebuild I also updated the ports and installed new version of > wine-devel. And to my surprise it works like a charm. Rolling back to > the world built with CPUTYPE=native makes wine break again. > > To my surprise CPUTYPE was not the cause of wine failure per se. Wine > continues to work for k6, k6-3, athlon and athlon-tbird. But it > completely fails when the world was built with athlon-4 and athlon-xp. > > Trying to recompile gcc I also found that everything works and yet again > up to the athlon-tbird. > > My conclusion is: clang incorrectly produces code within one of core > libraries (I haven't tested which one yet, but I suspect libgcc_s.so) > when optimizing for athlon-4 or athlon-xp. On the problematic athlons, can you please post the exact CPUIDs from dmesg? If you have WITH_CLANG_EXTRAS enabled, please also post the output of "opt -version".
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5087BD71.9090002>