From: Sergei Trofimovich Date: Sat, 14 Mar 2020 09:26:18 +0000 (+0000) Subject: sys-libs/glibc: add USE=static-pie to install rcrt1.o X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a6aac4bf276a0338c18fccd41d48ad7952f0a731;p=gentoo.git sys-libs/glibc: add USE=static-pie to install rcrt1.o To add support for gcc's -static-pie flag glibc needs to provide a few runtile files like rcrt1.o. Let's install those when requested. Noticed when looked at static-pie failures in bug #712356. The change should not fix test failures, but will provide a way to easily sanity-check static-pie health with minimal test. Bug: https://bugs.gentoo.org/712356 Package-Manager: Portage-2.3.93, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich --- diff --git a/sys-libs/glibc/glibc-2.31-r1.ebuild b/sys-libs/glibc/glibc-2.31-r1.ebuild index 14d8f5289a1d..97ad95166d0a 100644 --- a/sys-libs/glibc/glibc-2.31-r1.ebuild +++ b/sys-libs/glibc/glibc-2.31-r1.ebuild @@ -16,7 +16,8 @@ SLOT="2.2" EMULTILIB_PKG="true" if [[ ${PV} == 9999* ]]; then - EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + # sourceware.org does not have https:// today. + EGIT_REPO_URI="git://sourceware.org/git/glibc.git" inherit git-r3 else # needs minimal testing @@ -35,7 +36,7 @@ PATCH_DEV=slyfox SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" -IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs suid systemtap test vanilla" +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla" # Minimum kernel version that glibc requires MIN_KERN_VER="3.2.0" @@ -942,6 +943,7 @@ glibc_do_configure() { --with-pkgversion="$(glibc_banner)" $(use_enable crypt) $(use_multiarch || echo --disable-multi-arch) + $(use_enable static-pie) $(use_enable systemtap) $(use_enable nscd) ${EXTRA_ECONF} diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 70a236147aef..0090072dba2d 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -35,7 +35,7 @@ PATCH_VER=15 SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz" SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" -IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs suid systemtap test vanilla" +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla" # Minimum kernel version that glibc requires MIN_KERN_VER="3.2.0" @@ -942,6 +942,7 @@ glibc_do_configure() { --with-pkgversion="$(glibc_banner)" $(use_enable crypt) $(use_multiarch || echo --disable-multi-arch) + $(use_enable static-pie) $(use_enable systemtap) $(use_enable nscd) ${EXTRA_ECONF} diff --git a/sys-libs/glibc/metadata.xml b/sys-libs/glibc/metadata.xml index b00c5f56e586..6630fde73e7f 100644 --- a/sys-libs/glibc/metadata.xml +++ b/sys-libs/glibc/metadata.xml @@ -15,6 +15,7 @@ Build, and enable support for, the Name Service Cache Daemon Enable obsolete RPC/NIS layers protect stack of glibc internals + Enable static PIE support (runtime files for -static-pie gcc option). Make internal pt_chown helper setuid -- not needed if using Linux and have /dev/pts mounted with gid=5 enable systemtap static probe points