On Wed, 04 Jul 2012 17:08:30 +0200
Dimitry Andric <d...@freebsd.org> wrote:

> On 2012-07-04 16:33, Taku YAMAMOTO wrote:
> > For people having SIGBUS with clang-build world + gcc-build binaries,
> > 
> > 
> > In short words, for any libraries (and never forget about rtld-elf!)
> > which are potentially called from arbitrary binaries,
> > compile them with either -mstackrealign or -mstack-alignment=8!
> > 
> > The detail is as follows.
> > 
> > I've observed that clang carelessly expects the stack being aligned at
> > 16 byte boundary.
> 
> Eh, this is a requirement of the amd64 ABI.  Any compiler that *doesn't*
> align the stack on 16-byte boundaries is basically broken.  Or are you
> experiencing this on i386?  Even there, 16-byte alignment would be much
> better in combination with SSE instructions (which arent' enabled by
> default, btw).

Oops, I had to be clear about that!
Yes, the experiment was took on i386 (actually -march=pentium4).

> Note that you would get the same issue with newer versions of gcc, which
> will also assume this alignment.

Interesting, but the base gcc we currently have won't on i386, I think.
(I occationally get bitten by similar problem when using -ftree-vectorize)

-- 
-|-__   YAMAMOTO, Taku
 | __ <     <t...@tackymt.homeip.net>

      - A chicken is an egg's way of producing more eggs. -
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to