commit:     7e5859b42a87364c116f50c2c4c6be42ffaba1a9
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 11 20:39:05 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 25 21:39:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e5859b4

profiles: Mask glibc[stack-realign] on non-amd64/x86, default on amd64

The stack alignment issue affecting compatibility with older 32-bit
binaries is specific to amd64 and x86.

The workaround incurs a performance cost on the 32-bit build, so enable
the flag by default on amd64 but not on x86. Other popular distributions
always enable this workaround.

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 profiles/arch/amd64/no-multilib/package.use.mask | 6 +++++-
 profiles/arch/amd64/package.use                  | 7 ++++++-
 profiles/arch/amd64/package.use.mask             | 4 ++++
 profiles/arch/x86/package.use.mask               | 4 ++++
 profiles/base/package.use.mask                   | 4 ++++
 5 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/profiles/arch/amd64/no-multilib/package.use.mask 
b/profiles/arch/amd64/no-multilib/package.use.mask
index b0f82168e189..e97fb4228074 100644
--- a/profiles/arch/amd64/no-multilib/package.use.mask
+++ b/profiles/arch/amd64/no-multilib/package.use.mask
@@ -1,6 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# James Le Cuirot <ch...@gentoo.org> (2022-06-25)
+# This flag concerns a 32-bit x86-specific problem.
+sys-libs/glibc stack-realign
+
 # Ben Kohler <bkoh...@gentoo.org> (2022-06-07)
 # Disable 32bit builds on no-multilib
 sys-apps/memtest86+ bios32 efi32 iso32

diff --git a/profiles/arch/amd64/package.use b/profiles/arch/amd64/package.use
index a51accc1910e..7b827e562200 100644
--- a/profiles/arch/amd64/package.use
+++ b/profiles/arch/amd64/package.use
@@ -1,6 +1,11 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# James Le Cuirot <ch...@gentoo.org> (2022-06-25)
+# Realign the stack in the 32-bit build for compatibility with older binaries 
by
+# default. This is not the default on x86 because it has a performance cost.
+sys-libs/glibc stack-realign
+
 # Ben Kohler <bkoh...@gentoo.org> (2022-06-07)
 # Enable BIOS & UEFI targets by default
 sys-apps/memtest86+ bios64 efi64

diff --git a/profiles/arch/amd64/package.use.mask 
b/profiles/arch/amd64/package.use.mask
index 2ea7855ee51c..189adb55d64f 100644
--- a/profiles/arch/amd64/package.use.mask
+++ b/profiles/arch/amd64/package.use.mask
@@ -17,6 +17,10 @@
 
 #--- END OF EXAMPLES ---
 
+# James Le Cuirot <ch...@gentoo.org> (2022-06-25)
+# Allow stack to be realigned for compatibility with older 32-bit binaries.
+sys-libs/glibc -stack-realign
+
 # Unmask media-libs/libxmp here
 media-sound/qmmp -xmp
 

diff --git a/profiles/arch/x86/package.use.mask 
b/profiles/arch/x86/package.use.mask
index cc2431ca8f0a..a618c72fa0ce 100644
--- a/profiles/arch/x86/package.use.mask
+++ b/profiles/arch/x86/package.use.mask
@@ -1,6 +1,10 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# James Le Cuirot <ch...@gentoo.org> (2022-06-25)
+# Allow stack to be realigned for compatibility with older 32-bit binaries.
+sys-libs/glibc -stack-realign
+
 # Anna Vyalkova <cyber+gen...@sysrq.in> (2022-06-25)
 # Unkeyworded test dep
 app-vim/jedi test

diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask
index b65e7efa7daa..b97dee8d561f 100644
--- a/profiles/base/package.use.mask
+++ b/profiles/base/package.use.mask
@@ -6,6 +6,10 @@
 # This file is only for generic masks. For arch-specific masks (i.e.
 # mask everywhere, unmask on arch/*) use arch/base.
 
+# James Le Cuirot <ch...@gentoo.org> (2022-06-25)
+# This flag concerns an x86-specific problem.
+sys-libs/glibc stack-realign
+
 # Matt Turner <matts...@gentoo.org> (2022-06-21)
 # Depends on old spidermonkey:68. Upstream recommends using Duktape or Webkit
 # for PAC parsing. See https://github.com/libproxy/libproxy/pull/139

Reply via email to