diff options
author | Sam James <sam@gentoo.org> | 2022-06-25 22:36:50 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-06-25 22:39:41 +0100 |
commit | 020b1514bcb86d96700d81ff5ad82ec698b45311 (patch) | |
tree | ba5d012592ba4145babcb435c5557c43729fc2ad /profiles/default/linux/sparc/17.0/64ul/parent | |
parent | sys-libs/glibc: slight->some for stack-realign description (diff) | |
download | gentoo-020b1514bcb86d96700d81ff5ad82ec698b45311.tar.gz gentoo-020b1514bcb86d96700d81ff5ad82ec698b45311.tar.bz2 gentoo-020b1514bcb86d96700d81ff5ad82ec698b45311.zip |
sys-libs/ncurses: Add stack-realign flag for compat with old 32-bit x86 binaries
Older 32-bit x86 binaries aligned the stack to 4 bytes, whereas modern
binaries align to 16 bytes. These older binaries sometimes segfault when
newer libraries use SSE instructions. This is becoming increasingly
common. Applying the -mstackrealign flag to the 32-bit build works
around the issue but at a performance cost. Other popular
distributions always apply this.
[sam: There's no good choices here. As Ionen pointed out (I'd missed
any reports of this), this ends up getting worse with GCC 12's
default-on vectorisation at -O2. Let's make it optional for now for
32-bit/x86 (irrelevant for other arches, it's specific to x86 ABI).
ncurses is going to need similar treatment. If we end up having
to do this for far more packages, we may revisit and e.g.
just append-flags in ebuilds for right ABI and tell users
to set -mno-stackrealign, or similar.
Another option would be to set this globally by default (again,
this is only ever for x86), but it'd possibly be a big performance
hit (and bad enough doing it in glibc, but it's unavoidable).
The only saving grace here is that there aren't _that_ many
libraries with such longevity & ABI stability from back then
that older applications are using.]
Bug: https://bugs.gentoo.org/616402
Bug: https://github.com/taviso/123elf/issues/12
See: 02aa6328a720c
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'profiles/default/linux/sparc/17.0/64ul/parent')
0 files changed, 0 insertions, 0 deletions