commit: 482fa96f4ed12c6c5fdb8c6aea17340136ecbdac Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> AuthorDate: Tue Sep 20 20:18:51 2022 +0000 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> CommitDate: Tue Sep 20 20:20:17 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=482fa96f
sys-libs/glibc: Introduce useflag hash-sysv-compat, untested so far Bug: https://bugs.gentoo.org/864100 Bug: https://bugs.gentoo.org/863863 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> sys-libs/glibc/{glibc-9999.ebuild => glibc-2.36-r3.ebuild} | 12 +++++++++--- sys-libs/glibc/glibc-9999.ebuild | 8 +++++++- sys-libs/glibc/metadata.xml | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-2.36-r3.ebuild similarity index 98% copy from sys-libs/glibc/glibc-9999.ebuild copy to sys-libs/glibc/glibc-2.36-r3.ebuild index 6797fdf6cd8a..5e0dceed3be4 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-2.36-r3.ebuild @@ -20,13 +20,13 @@ SLOT="2.2" EMULTILIB_PKG="true" # Gentoo patchset (ignored for live ebuilds) -PATCH_VER=1 +PATCH_VER=3 PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then inherit git-r3 else - #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" KEYWORDS="" SRC_URI="mirror://gnu/glibc/${P}.tar.xz" SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" @@ -44,7 +44,7 @@ SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${L SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" -IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" # Minimum kernel version that glibc requires MIN_KERN_VER="3.2.0" @@ -418,6 +418,12 @@ setup_flags() { # https://sourceware.org/PR27837 filter-ldflags '-Wl,--relax' + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 + # we have to do that here already so mips can filter it out again :P + if use hash-sysv-compat ; then + append-ldflags '-Wl,--hash-style=both' + fi + # #492892 filter-flags -frecord-gcc-switches diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 6797fdf6cd8a..68785ea5f6e6 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -44,7 +44,7 @@ SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${L SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" -IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" # Minimum kernel version that glibc requires MIN_KERN_VER="3.2.0" @@ -418,6 +418,12 @@ setup_flags() { # https://sourceware.org/PR27837 filter-ldflags '-Wl,--relax' + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 + # we have to do that here already so mips can filter it out again :P + if use hash-sysv-compat ; then + append-ldflags '-Wl,--hash-style=both' + fi + # #492892 filter-flags -frecord-gcc-switches diff --git a/sys-libs/glibc/metadata.xml b/sys-libs/glibc/metadata.xml index eb25b52087e2..69c29b299aab 100644 --- a/sys-libs/glibc/metadata.xml +++ b/sys-libs/glibc/metadata.xml @@ -13,6 +13,7 @@ <flag name="debug">When USE=hardened, allow fortify/stack violations to dump core (SIGABRT) and not kill self (SIGKILL)</flag> <flag name="experimental-loong">Add experimental LoongArch patchset</flag> <flag name="gd">build memusage and memusagestat tools</flag> + <flag name="hash-sysv-compat">enable sysv linker hashes in glibc for compatibility with binary software (EAC via wine/proton)</flag> <flag name="multiarch">enable optimizations for multiple CPU architectures (detected at runtime)</flag> <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>
