November 5th is Clang-Day

Konstantin Belousov kostikbel at gmail.com
Sun Nov 4 13:18:35 UTC 2012


On Sun, Nov 04, 2012 at 02:42:13PM +0200, David Naylor wrote:
> On Saturday, 3 November 2012 23:47:54 Jan Beich wrote:
> > David Naylor <naylor.b.david at gmail.com> writes:
> > > There are two issues here: 1) wine compiled with clang, and 2) wine
> > > (compiled with gcc) running on clang compiled base.
> > > 
> > > Regarding 1), according to the wiki [1], wine does have stack alignment
> > > issues and some wine programs do not run when compiled with clang [2][3]
> > > and other bugs with clang cause freezing within wine [4][5].  The
> > > impression I get is that, using the work-a-round of stack realignment,
> > > wine does work to some extent when compiled by clang.
> > 
> > Took me some time but now I can confirm that clang-built wine-1.5.16
> > works fine for me with gcc-built lib32 (i.e. ld-elf32.so.1 + /usr/lib32).
> > 
> > > Regarding 2) (which I believe Jan was referring to), when I have a gcc
> > > built world and just replace lib32 with clang built libraries I have
> > > winecfg and regedit launching but displaying black screens.  Switching
> > > back to gcc built lib32 I get a working winecfg and regedit.  This, to
> > > me, indicates a clang error somewhere.
> > 
> > My experience varies between clang-built and gcc-built wine.
> > 
> >   # clang, quick crash
> > 
> >   # gcc, black rectangle
> > 
> > So, why not switch stack alignment in wine (upstream)? This would make
> > /stable/9 wine package continue to work on /head.
> > 
> > Here's my wine package built with and without the patch.
> > 
> > # sha256: cef5e543a5c534acb7237634224561863122ab3c256df319c6428856266d79fd
> > http://ompldr.org/vZzR0bw/4byte-clang-wine-fbsd64-1.5.16,1.txz
> > # sha256: 68e402bf7cb39ea48b9bef7772422cf476e89b214fd3b98ced37e0068f588c6c
> > http://ompldr.org/vZzR0ZA/16byte-clang-wine-fbsd64-1.5.16,1.txz
> 
> I tried building (using gcc) wine with your patch and now (at least) winecfg 
> and regedit work with a clang built lib32.  I'll email Gerald (wine's 
> maintainer) about including your patch in wine.  

The wine is the wrong place to fix. If system libraries suddenly started
requiring 16-byte stack alignment on i386, it is unacceptable breakage
of the ABI.

I tried to gather the evidence for the case, but apparent submitter of the
bug stopped replying to the requests.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20121104/1f642b43/attachment.sig>


More information about the freebsd-current mailing list