commit:     825803c522c3da141d95a2fa303c15aee33dfe91
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  6 11:27:50 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Aug  6 11:27:50 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=825803c5

sys-libs/glibc: wire up sframe support

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-libs/glibc/glibc-2.42.ebuild | 15 +++++++++++----
 sys-libs/glibc/glibc-9999.ebuild |  8 +++++++-
 sys-libs/glibc/metadata.xml      |  1 +
 3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/sys-libs/glibc/glibc-2.42.ebuild b/sys-libs/glibc/glibc-2.42.ebuild
index 2a15610af94d..c24a29d34e1a 100644
--- a/sys-libs/glibc/glibc-2.42.ebuild
+++ b/sys-libs/glibc/glibc-2.42.ebuild
@@ -38,7 +38,7 @@ inherit python-any-r1 prefix preserve-libs toolchain-funcs 
flag-o-matic gnuconfi
 DESCRIPTION="GNU libc C library"
 HOMEPAGE="https://www.gnu.org/software/libc/";
 
-if [[ ${PV} == 9999* ]]; then
+if [[ ${PV} == *9999 ]]; then
        inherit git-r3
 else
        #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86"
@@ -51,7 +51,7 @@ SRC_URI+=" systemd? ( 
https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git
 
 LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
 SLOT="2.2"
-IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat 
headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux 
+ssp stack-realign +static-libs suid systemd systemtap test vanilla"
+IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat 
headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux 
sframe +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
 
 # Here's how the cross-compile logic breaks down ...
 #  CTARGET - machine that will target the binaries
@@ -115,6 +115,7 @@ BDEPEND="
                dev-lang/perl
                sys-apps/texinfo
        )
+       sframe? ( >=sys-devel/binutils-2.45 )
        test? (
                dev-lang/perl
                >=net-dns/libidn2-2.3.0
@@ -930,7 +931,7 @@ src_unpack() {
 
        use multilib-bootstrap && unpack 
gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
 
-       if [[ ${PV} == 9999* ]] ; then
+       if [[ ${PV} == *9999 ]] ; then
                EGIT_REPO_URI="
                        
https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git
                        https://github.com/gentoo/glibc-patches.git
@@ -944,12 +945,13 @@ src_unpack() {
                        https://gitlab.com/x86-glibc/glibc.git
                "
                EGIT_CHECKOUT_DIR=${S}
+               [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH=release/${PV%.*}/master
                git-r3_src_unpack
        else
                unpack ${P}.tar.xz
 
                cd "${WORKDIR}" || die
-               unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz
+               unpack ${P}-patches-${PATCH_VER}.tar.xz
        fi
 
        cd "${WORKDIR}" || die
@@ -1020,6 +1022,11 @@ glibc_do_configure() {
                *) ;;
        esac
 
+       case ${ABI}-${CTARGET} in
+               amd64-x86_64-*|arm64-aarch64-*) myconf+=( $(use_enable sframe) 
) ;;
+               *) ;;
+       esac
+
        [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
 
        myconf+=( --enable-kernel=${MIN_KERN_VER} )

diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 0133b65ee20b..0e65d86c7909 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -51,7 +51,7 @@ SRC_URI+=" systemd? ( 
https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git
 
 LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
 SLOT="2.2"
-IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat 
headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux 
+ssp stack-realign +static-libs suid systemd systemtap test vanilla"
+IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat 
headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux 
sframe +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
 
 # Here's how the cross-compile logic breaks down ...
 #  CTARGET - machine that will target the binaries
@@ -115,6 +115,7 @@ BDEPEND="
                dev-lang/perl
                sys-apps/texinfo
        )
+       sframe? ( >=sys-devel/binutils-2.45 )
        test? (
                dev-lang/perl
                >=net-dns/libidn2-2.3.0
@@ -1021,6 +1022,11 @@ glibc_do_configure() {
                *) ;;
        esac
 
+       case ${ABI}-${CTARGET} in
+               amd64-x86_64-*|arm64-aarch64-*) myconf+=( $(use_enable sframe) 
) ;;
+               *) ;;
+       esac
+
        [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
 
        myconf+=( --enable-kernel=${MIN_KERN_VER} )

diff --git a/sys-libs/glibc/metadata.xml b/sys-libs/glibc/metadata.xml
index 846d01d34e0c..6978f9425efe 100644
--- a/sys-libs/glibc/metadata.xml
+++ b/sys-libs/glibc/metadata.xml
@@ -18,6 +18,7 @@
                <flag name="multilib-bootstrap">Provide prebuilt libgcc.a and 
crt files if missing. Only needed for ABI switch.</flag>
                <flag name="nscd">Build, and enable support for, the Name 
Service Cache Daemon</flag>
                <flag name="perl">Install additional scripts written in 
Perl</flag>
+               <flag name="sframe">enable building with sframe backtrace 
support</flag>
                <flag name="ssp">protect stack of glibc internals</flag>
                <flag name="stack-realign">Realign the stack in the 32-bit 
build for compatibility with older binaries at some performance cost</flag>
                <flag name="static-pie">Enable static PIE support (runtime 
files for -static-pie gcc option).</flag>

Reply via email to