From 618c3037024b4e5328531cdc07c6ceb7486f5329 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 31 Dec 2017 22:30:36 +0000 Subject: gentoo resync : 31.12.2017 (final resync this year) --- sys-libs/Manifest.gz | Bin 15582 -> 15574 bytes sys-libs/glibc/Manifest | 4 +- sys-libs/glibc/glibc-2.26-r4.ebuild | 842 ----------------------------------- sys-libs/glibc/glibc-2.26-r5.ebuild | 845 ++++++++++++++++++++++++++++++++++++ sys-libs/glibc/glibc-9999.ebuild | 11 +- sys-libs/libomp/Manifest | 8 +- sys-libs/libomp/libomp-4.0.1.ebuild | 13 +- sys-libs/libomp/libomp-5.0.0.ebuild | 13 +- sys-libs/libomp/libomp-5.0.1.ebuild | 13 +- sys-libs/libomp/libomp-9999.ebuild | 13 +- 10 files changed, 898 insertions(+), 864 deletions(-) delete mode 100644 sys-libs/glibc/glibc-2.26-r4.ebuild create mode 100644 sys-libs/glibc/glibc-2.26-r5.ebuild (limited to 'sys-libs') diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz index 110bf790fb4d..3812e4577dc7 100644 Binary files a/sys-libs/Manifest.gz and b/sys-libs/Manifest.gz differ diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index 0a71506ebe3c..cf90a6e004da 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -45,6 +45,6 @@ EBUILD glibc-2.24-r4.ebuild 5047 BLAKE2B 295eeb6cecff9f9b33d428a3f52d68a5af0c92a EBUILD glibc-2.25-r10.ebuild 4965 BLAKE2B 060110e8a01add709b5fd4892d7cdaeb71ec3a2300b27f21b103933ac60b3118c075a7dba70d8886d363953323be8473f8cc9fb672456c24fa324674465c9534 SHA512 bf04ea4805336e34479195dc136827ff78c752eb415f54b9a23924d28851554ca9bd9c68a8be264a810e7e74e536d43be5645fa54d79fb00ea2714116bf8d9eb EBUILD glibc-2.25-r9.ebuild 5038 BLAKE2B 6bf0e5ad7ff8403fdf35e001418446cb5bc09c4407f28ee04be3e5bf0ab3bb5da57128cea4e4943c81a615b7704ef4e1805d61540b39702702da3723eeee8ada SHA512 e28ab996019d8f3b80523ca4ae2c42857e469ce61eb01d1c248699a37d141223bac5c345b14bd50d18fedd173818d6bc94ab0bcd37aa565cd695bdbbc7dd7b6b EBUILD glibc-2.26-r3.ebuild 25373 BLAKE2B b39fb75551e268f4942457d3aa8a06b7e707032ba68388d8303f43bb047299ce976844384d28c0de7d9a0947a769fe7f96beabb4a60c45790465a0fe4c92a556 SHA512 fb21295d3bc781df3882b3eabb1f3d95d7d1465bfd28a4bd45a79a593c3ad61f042d147c0d1dc835e206a3e0fff975724a1295725fbe81a8718307d315719ccd -EBUILD glibc-2.26-r4.ebuild 25388 BLAKE2B eaa2d151a2320a4b0a599e2feb2cf92c2b366013d4635a4162556e8f9c40eb211674dec9e247bb7b020d34ffb172be792cf38c476aab250dbb06d6335a3ce780 SHA512 7e8974fbc214dd52f16ae210f6e757afe5f8cc915f86405d21ebe32d81b25a3800577463c3c3ef317155e3cb6680fac1c6c6ea61eccc559b95cc064def2db393 -EBUILD glibc-9999.ebuild 25615 BLAKE2B fa6507373cf8c934beca7228b8768cfc573077f416e938e5b36cc5f39894ac9a646b05746548b7b7625f4ee34ffbd165319aaa45768a963c10b8d8654e304826 SHA512 ed0a29a626c9a55432d45a5cc3814b34ee3fae775eb529969810be918f33b0fca4c0bed54d66f07961a0600e1cf8aec67ca611a486f48853376bdd510008a82e +EBUILD glibc-2.26-r5.ebuild 25594 BLAKE2B d127817d3554218ee16cae19a1e959083950675e0aaeadaba9185425f28a17141b5d9a578e28dc4b58a376444a8df41a8fac9632f82382e427adfd755132ff6b SHA512 11196cf14c1891e13bc7b6e2b6e687dfd85c6b59328902bd6adf5e068b87e2c96253408e9d8ba8a8c2b7f47b7818017d43b46411be9ea30231c0708866b19da6 +EBUILD glibc-9999.ebuild 25821 BLAKE2B c52ab7226bd30f3d3cc674575e8022a84c040e04ae5221ef7e479c71dcb5d74c7d721a8d02aecee42341dbf1c2f111ea3d472d9cd33f83b1f4b0d837af8b7cea SHA512 ead08f31af0d81a53203146e7a6001d3c9b8e182a7ab524efb7fe70188fdf4aa0250c65f02b06e996c2cd2ee705ac7f6394ab7f98ed539125c44d048703ca139 MISC metadata.xml 1054 BLAKE2B dbc091e54130729385bc02aaa1025885f101caa88d601b1f7670974d89e7e24aae5d37fd6699278a37c0064e1f3232c04954dc127869427317b5d80b499f3813 SHA512 65474b7d32ceb6bafe8ae0e18aa0b46b68cefecce5570a0e8d4a0117019e6540f2feae35cecbebad382b4f06d6e5ae1dfa9b8a61889881e8534956dd42df8e4b diff --git a/sys-libs/glibc/glibc-2.26-r4.ebuild b/sys-libs/glibc/glibc-2.26-r4.ebuild deleted file mode 100644 index 97cf7ef1cbce..000000000000 --- a/sys-libs/glibc/glibc-2.26-r4.ebuild +++ /dev/null @@ -1,842 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit prefix toolchain-glibc - -DESCRIPTION="GNU libc C library" -HOMEPAGE="https://www.gnu.org/software/libc/" - -LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" -RESTRICT="strip" # Strip ourself #46186 -EMULTILIB_PKG="true" - -# Configuration variables - -if [[ ${PV} == 9999* ]]; then - EGIT_REPO_URI="git://sourceware.org/git/glibc.git" - inherit git-r3 -else - # KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" - KEYWORDS="" - SRC_URI="mirror://gnu/glibc/${P}.tar.xz" -fi - -RELEASE_VER=${PV} - -GCC_BOOTSTRAP_VER="4.7.3-r1" - -# Gentoo patchset -PATCH_VER=5 - -SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2" -SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 )" - -IUSE="audit caps debug doc gd hardened multilib nscd selinux systemtap profile suid vanilla crosscompile_opts_headers-only" - -# Min kernel version glibc requires -: ${NPTL_KERN_VER:="3.2.0"} - -# Here's how the cross-compile logic breaks down ... -# CTARGET - machine that will target the binaries -# CHOST - machine that will host the binaries -# CBUILD - machine that will build the binaries -# If CTARGET != CHOST, it means you want a libc for cross-compiling. -# If CHOST != CBUILD, it means you want to cross-compile the libc. -# CBUILD = CHOST = CTARGET - native build/install -# CBUILD != (CHOST = CTARGET) - cross-compile a native build -# (CBUILD = CHOST) != CTARGET - libc for cross-compiler -# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler -# For install paths: -# CHOST = CTARGET - install into / -# CHOST != CTARGET - install into /usr/CTARGET/ - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} - -SLOT="2.2" - -# General: We need a new-enough binutils/gcc to match upstream baseline. -# arch: we need to make sure our binutils/gcc supports TLS. -COMMON_DEPEND=" - nscd? ( selinux? ( - audit? ( sys-process/audit ) - caps? ( sys-libs/libcap ) - ) ) - suid? ( caps? ( sys-libs/libcap ) ) - selinux? ( sys-libs/libselinux ) - systemtap? ( dev-util/systemtap ) -" -DEPEND="${COMMON_DEPEND} - >=app-misc/pax-utils-0.1.10 - !2.19, but 2.20-r3->2.20-r2 should be fine. - # Hopefully we never actually use a r# this high. - if has_version ">${CATEGORY}/${P}-r10000" ; then - eerror "Sanity check to keep you from breaking your system:" - eerror " Downgrading glibc is not supported and a sure way to destruction" - die "Aborting to save your system" - fi - - if ! glibc_run_test '#include \nint main(){return getpwuid(0)==0;}\n' - then - eerror "Your patched vendor kernel is broken. You need to get an" - eerror "update from whoever is providing the kernel to you." - eerror "https://sourceware.org/bugzilla/show_bug.cgi?id=5227" - eerror "https://bugs.gentoo.org/262698" - die "Keeping your system alive, say thank you" - fi - - if ! glibc_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' - then - eerror "Your old kernel is broken. You need to update it to" - eerror "a newer version as syscall() will break." - eerror "https://bugs.gentoo.org/279260" - die "Keeping your system alive, say thank you" - fi - fi - - # Users have had a chance to phase themselves, time to give em the boot - if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then - eerror "You still haven't deleted ${EROOT}/etc/locales.build." - eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." - die "Lazy upgrader detected" - fi - - if [[ ${CTARGET} == i386-* ]] ; then - eerror "i386 CHOSTs are no longer supported." - eerror "Chances are you don't actually want/need i386." - eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" - die "Please fix your CHOST" - fi - - if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then - ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." - ewarn "This will result in a 50% performance penalty when running with a 32bit" - ewarn "hypervisor, which is probably not what you want." - fi - - use hardened && ! tc-enables-pie && \ - ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" - - # Make sure host system is up to date #394453 - if has_version ' /dev/null - local addons=$(echo */configure | sed \ - -e 's:/configure::g' \ - -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \ - -e 's: \+$::' \ - -e 's! !,!g' \ - -e 's!^!,!' \ - -e '/^,\*$/d') - [[ -d ports ]] && addons+=",ports" - popd > /dev/null - - case ${CTARGET} in - mips*) - # dlopen() detects stack smash on mips n32 ABI. - # Cause is unknown: https://bugs.gentoo.org/640130 - myconf+=( --enable-stack-protector=no ) - ;; - powerpc-*) - # Currently gcc on powerpc32 generates invalid code for - # __builtin_return_address(0) calls. Normally programs - # don't do that but malloc hooks in glibc do: - # https://gcc.gnu.org/PR81996 - # https://bugs.gentoo.org/629054 - myconf+=( --enable-stack-protector=no ) - ;; - *) - myconf+=( --enable-stack-protector=all ) - ;; - esac - myconf+=( --enable-stackguard-randomization ) - - # Keep a whitelist of targets supporing IFUNC. glibc's ./configure - # is not robust enough to detect proper support: - # https://bugs.gentoo.org/641216 - # https://sourceware.org/PR22634#c0 - case $(tc-arch ${CTARGET}) in - # Keep whitelist of targets where autodetection mostly works. - amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; - # Blacklist everywhere else - *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; - esac - - [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) - - if [[ $1 == "nptl" ]] ; then - myconf+=( --enable-kernel=${NPTL_KERN_VER} ) - else - die "invalid pthread option" - fi - myconf+=( --enable-add-ons="${addons#,}" ) - - # Since SELinux support is only required for nscd, only enable it if: - # 1. USE selinux - # 2. only for the primary ABI on multilib systems - # 3. Not a crosscompile - if ! is_crosscompile && use selinux ; then - if use multilib ; then - if is_final_abi ; then - myconf+=( --with-selinux ) - else - myconf+=( --without-selinux ) - fi - else - myconf+=( --with-selinux ) - fi - else - myconf+=( --without-selinux ) - fi - - # Force a few tests where we always know the answer but - # configure is incapable of finding it. - if is_crosscompile ; then - export \ - libc_cv_c_cleanup=yes \ - libc_cv_forced_unwind=yes - fi - - myconf+=( - --without-cvs - --disable-werror - --enable-bind-now - --build=${CBUILD_OPT:-${CBUILD}} - --host=${CTARGET_OPT:-${CTARGET}} - $(use_enable profile) - $(use_with gd) - --with-headers=$(alt_build_headers) - --prefix="${EPREFIX}/usr" - --sysconfdir="${EPREFIX}/etc" - --localstatedir="${EPREFIX}/var" - --libdir='$(prefix)'/$(get_libdir) - --mandir='$(prefix)'/share/man - --infodir='$(prefix)'/share/info - --libexecdir='$(libdir)'/misc/glibc - --with-bugurl=https://bugs.gentoo.org/ - --with-pkgversion="$(glibc_banner)" - $(use_multiarch || echo --disable-multi-arch) - $(in_iuse systemtap && use_enable systemtap) - $(in_iuse nscd && use_enable nscd) - ${EXTRA_ECONF} - ) - - # We rely on sys-libs/timezone-data for timezone tools normally. - myconf+=( $(use_enable vanilla timezone-tools) ) - - # These libs don't have configure flags. - ac_cv_lib_audit_audit_log_user_avc_message=$(in_iuse audit && usex audit || echo no) - ac_cv_lib_cap_cap_init=$(in_iuse caps && usex caps || echo no) - - # There is no configure option for this and we need to export it - # since the glibc build will re-run configure on itself - export libc_cv_rootsbindir="${EPREFIX}/sbin" - export libc_cv_slibdir="${EPREFIX}/$(get_libdir)" - - # We take care of patching our binutils to use both hash styles, - # and many people like to force gnu hash style only, so disable - # this overriding check. #347761 - export libc_cv_hashstyle=no - - local builddir=$(builddir "$1") - mkdir -p "${builddir}" - cd "${builddir}" - set -- "${S}"/configure "${myconf[@]}" - echo "$@" - "$@" || die "failed to configure glibc" - - # ia64 static cross-compilers are a pita in so much that they - # can't produce static ELFs (as the libgcc.a is broken). so - # disable building of the programs for those targets if it - # doesn't work. - # XXX: We could turn this into a compiler test, but ia64 is - # the only one that matters, so this should be fine for now. - if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then - sed -i '1i+link-static = touch $@' config.make - fi - - # If we're trying to migrate between ABI sets, we need - # to lie and use a local copy of gcc. Like if the system - # is built with MULTILIB_ABIS="amd64 x86" but we want to - # add x32 to it, gcc/glibc don't yet support x32. - if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then - echo 'main(){}' > "${T}"/test.c - if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then - sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die - mkdir -p sunrpc - cp $(which rpcgen) sunrpc/cross-rpcgen || die - touch -t 202001010101 sunrpc/cross-rpcgen || die - fi - fi -} - -glibc_headers_configure() { - export ABI=default - - local builddir=$(builddir "headers") - mkdir -p "${builddir}" - cd "${builddir}" - - # if we don't have a compiler yet, we can't really test it now ... - # hopefully they don't affect header generation, so let's hope for - # the best here ... - local v vars=( - ac_cv_header_cpuid_h=yes - libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes - libc_cv_asm_cfi_directives=yes - libc_cv_broken_visibility_attribute=no - libc_cv_c_cleanup=yes - libc_cv_forced_unwind=yes - libc_cv_gcc___thread=yes - libc_cv_mlong_double_128=yes - libc_cv_mlong_double_128ibm=yes - libc_cv_ppc_machine=yes - libc_cv_ppc_rel16=yes - libc_cv_predef_fortify_source=no - libc_cv_visibility_attribute=yes - libc_cv_z_combreloc=yes - libc_cv_z_execstack=yes - libc_cv_z_initfirst=yes - libc_cv_z_nodelete=yes - libc_cv_z_nodlopen=yes - libc_cv_z_relro=yes - libc_mips_abi=${ABI} - libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) - # These libs don't have configure flags. - ac_cv_lib_audit_audit_log_user_avc_message=no - ac_cv_lib_cap_cap_init=no - ) - - einfo "Forcing cached settings:" - for v in "${vars[@]}" ; do - einfo " ${v}" - export ${v} - done - - # Blow away some random CC settings that screw things up. #550192 - if [[ -d ${S}/sysdeps/mips ]]; then - pushd "${S}"/sysdeps/mips >/dev/null - sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die - sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die - - # Force the mips ABI to the default. This is OK because the set of - # installed headers in this phase is the same between the 3 ABIs. - # If this ever changes, this hack will break, but that's unlikely - # as glibc discourages that behavior. - # https://crbug.com/647033 - sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die - - popd >/dev/null - fi - - local myconf=() - myconf+=( - --disable-sanity-checks - --enable-hacker-mode - --without-cvs - --disable-werror - --enable-bind-now - --build=${CBUILD_OPT:-${CBUILD}} - --host=${CTARGET_OPT:-${CTARGET}} - --with-headers=$(alt_build_headers) - --prefix="${EPREFIX}/usr" - ${EXTRA_ECONF} - ) - - local addons - [[ -d ${S}/ports ]] && addons+=",ports" - myconf+=( --enable-add-ons="${addons#,}" ) - - # Nothing is compiled here which would affect the headers for the target. - # So forcing CC/CFLAGS is sane. - set -- "${S}"/configure "${myconf[@]}" - echo "$@" - CC="$(tc-getBUILD_CC)" \ - CFLAGS="-O1 -pipe" \ - CPPFLAGS="-U_FORTIFY_SOURCE" \ - LDFLAGS="" \ - "$@" || die "failed to configure glibc" -} - -do_src_configure() { - if just_headers ; then - glibc_headers_configure - else - glibc_do_configure nptl - fi -} - -src_configure() { - foreach_abi do_src_configure -} - -do_src_compile() { - emake -C "$(builddir nptl)" || die "make nptl for ${ABI} failed" -} - -src_compile() { - if just_headers ; then - return - fi - - foreach_abi do_src_compile -} - -glibc_src_test() { - cd "$(builddir $1)" - emake -j1 check -} - -do_src_test() { - local ret=0 - - glibc_src_test nptl - : $(( ret |= $? )) - - return ${ret} -} - -src_test() { - # Give tests more time to complete. - export TIMEOUTFACTOR=5 - - foreach_abi do_src_test || die "tests failed" -} - -glibc_do_src_install() { - local builddir=$(builddir nptl) - cd "${builddir}" - - emake install_root="${D}$(alt_prefix)" install || die - - # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support - # which come without headers etc. Only needed for binary packages since the - # external net-libs/libnsl has increased soversion. Keep only versioned libraries. - find "${D}" -name "libnsl.a" -delete - find "${D}" -name "libnsl.so" -delete - - # Normally real_pv is ${PV}. Live ebuilds are exception, there we need - # to infer upstream version: - # '#define VERSION "2.26.90"' -> '2.26.90' - local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) - - # Newer versions get fancy with libm linkage to include vectorized support. - # While we don't really need a ldscript here, portage QA checks get upset. - if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then - dosym ../../$(get_libdir)/libm-${upstream_pv}.so $(alt_usrlibdir)/libm-${upstream_pv}.so - fi - - # We'll take care of the cache ourselves - rm -f "${ED}"/etc/ld.so.cache - - # Everything past this point just needs to be done once ... - is_final_abi || return 0 - - # Make sure the non-native interp can be found on multilib systems even - # if the main library set isn't installed into the right place. Maybe - # we should query the active gcc for info instead of hardcoding it ? - local i ldso_abi ldso_name - local ldso_abi_list=( - # x86 - amd64 /lib64/ld-linux-x86-64.so.2 - x32 /libx32/ld-linux-x32.so.2 - x86 /lib/ld-linux.so.2 - # mips - o32 /lib/ld.so.1 - n32 /lib32/ld.so.1 - n64 /lib64/ld.so.1 - # powerpc - ppc /lib/ld.so.1 - ppc64 /lib64/ld64.so.1 - # s390 - s390 /lib/ld.so.1 - s390x /lib/ld64.so.1 - # sparc - sparc32 /lib/ld-linux.so.2 - sparc64 /lib64/ld-linux.so.2 - ) - case $(tc-endian) in - little) - ldso_abi_list+=( - # arm - arm64 /lib/ld-linux-aarch64.so.1 - ) - ;; - big) - ldso_abi_list+=( - # arm - arm64 /lib/ld-linux-aarch64_be.so.1 - ) - ;; - esac - if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then - dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib - fi - for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do - ldso_abi=${ldso_abi_list[i]} - has ${ldso_abi} $(get_install_abis) || continue - - ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" - if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then - dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} - fi - done - - # With devpts under Linux mounted properly, we do not need the pt_chown - # binary to be setuid. This is because the default owners/perms will be - # exactly what we want. - if in_iuse suid && ! use suid ; then - find "${ED}" -name pt_chown -exec chmod -s {} + - fi - - ################################################################# - # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # - # Make sure we install some symlink hacks so that when we build - # a 2nd stage cross-compiler, gcc finds the target system - # headers correctly. See gcc/doc/gccinstall.info - if is_crosscompile ; then - # We need to make sure that /lib and /usr/lib always exists. - # gcc likes to use relative paths to get to its multilibs like - # /usr/lib/../lib64/. So while we don't install any files into - # /usr/lib/, we do need it to exist. - cd "${ED}"$(alt_libdir)/.. - [[ -e lib ]] || mkdir lib - cd "${ED}"$(alt_usrlibdir)/.. - [[ -e lib ]] || mkdir lib - - dosym usr/include $(alt_prefix)/sys-include - return 0 - fi - - # Files for Debian-style locale updating - dodir /usr/share/i18n - sed \ - -e "/^#/d" \ - -e "/SUPPORTED-LOCALES=/d" \ - -e "s: \\\\::g" -e "s:/: :g" \ - "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ - || die "generating /usr/share/i18n/SUPPORTED failed" - cd "${WORKDIR}"/extra/locale - dosbin locale-gen - doman *.[0-8] - insinto /etc - doins locale.gen - - # Make sure all the ABI's can find the locales and so we only - # have to generate one set - local a - keepdir /usr/$(get_libdir)/locale - for a in $(get_install_abis) ; do - if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then - dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale - fi - done - - cd "${S}" - - # Install misc network config files - insinto /etc - doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf - doins "${WORKDIR}"/extra/etc/*.conf - - if use nscd ; then - doinitd "$(prefixify_ro "${WORKDIR}"/extra/etc/nscd)" - - local nscd_args=( - -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" - ) - - sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd - - systemd_dounit nscd/nscd.service - systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf - else - # Do this since extra/etc/*.conf above might have nscd.conf. - rm -f "${ED}"/etc/nscd.conf - fi - - echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc - doenvd "${T}"/00glibc - - for d in BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do - [[ -s ${d} ]] && dodoc ${d} - done - - # Prevent overwriting of the /etc/localtime symlink. We'll handle the - # creation of the "factory" symlink in pkg_postinst(). - rm -f "${ED}"/etc/localtime -} - -glibc_headers_install() { - local builddir=$(builddir "headers") - cd "${builddir}" - emake install_root="${D}$(alt_prefix)" install-headers - - insinto $(alt_headers)/gnu - doins "${S}"/include/gnu/stubs.h - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - dosym usr/include $(alt_prefix)/sys-include -} - -src_install() { - if just_headers ; then - export ABI=default - glibc_headers_install - return - fi - - foreach_abi glibc_do_src_install - src_strip -} - -pkg_preinst() { - # nothing to do if just installing headers - just_headers && return - - # prepare /etc/ld.so.conf.d/ for files - mkdir -p "${EROOT}"/etc/ld.so.conf.d - - # Default /etc/hosts.conf:multi to on for systems with small dbs. - if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then - sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf - einfo "Defaulting /etc/host.conf:multi to on" - fi - - [[ ${ROOT} != "/" ]] && return 0 - [[ -d ${ED}/$(get_libdir) ]] || return 0 - [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check -} - -pkg_postinst() { - # nothing to do if just installing headers - just_headers && return - - if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then - # Generate fastloading iconv module configuration file. - "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" - fi - - if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then - # Reload init ... if in a chroot or a diff init package, ignore - # errors from this step #253697 - /sbin/telinit U 2>/dev/null - - # if the host locales.gen contains no entries, we'll install everything - local locale_list="${EROOT}etc/locale.gen" - if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then - ewarn "Generating all locales; edit /etc/locale.gen to save time/space" - locale_list="${EROOT}usr/share/i18n/SUPPORTED" - fi - locale-gen -j $(makeopts_jobs) --config "${locale_list}" - fi - - # Check for sanity of /etc/nsswitch.conf, take 2 - if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then - local entry - for entry in passwd group shadow; do - if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then - ewarn "" - ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" - ewarn "removed from glibc and is now provided by the package" - ewarn " sys-auth/libnss-nis" - ewarn "Install it now to keep your NIS setup working." - ewarn "" - fi - done - fi -} diff --git a/sys-libs/glibc/glibc-2.26-r5.ebuild b/sys-libs/glibc/glibc-2.26-r5.ebuild new file mode 100644 index 000000000000..abde9e62f95f --- /dev/null +++ b/sys-libs/glibc/glibc-2.26-r5.ebuild @@ -0,0 +1,845 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit prefix toolchain-glibc + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" + +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +RESTRICT="strip" # Strip ourself #46186 +EMULTILIB_PKG="true" + +# Configuration variables + +if [[ ${PV} == 9999* ]]; then + EGIT_REPO_URI="git://sourceware.org/git/glibc.git" + inherit git-r3 +else + # KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" + KEYWORDS="" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER="4.7.3-r1" + +# Gentoo patchset +PATCH_VER=5 + +SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2" +SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 )" + +IUSE="audit caps debug doc gd hardened multilib nscd selinux systemtap profile suid vanilla crosscompile_opts_headers-only" + +# Min kernel version glibc requires +: ${NPTL_KERN_VER:="3.2.0"} + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} + +SLOT="2.2" + +# General: We need a new-enough binutils/gcc to match upstream baseline. +# arch: we need to make sure our binutils/gcc supports TLS. +COMMON_DEPEND=" + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-util/systemtap ) +" +DEPEND="${COMMON_DEPEND} + >=app-misc/pax-utils-0.1.10 + !2.19, but 2.20-r3->2.20-r2 should be fine. + # Hopefully we never actually use a r# this high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction" + die "Aborting to save your system" + fi + + if ! glibc_run_test '#include \nint main(){return getpwuid(0)==0;}\n' + then + eerror "Your patched vendor kernel is broken. You need to get an" + eerror "update from whoever is providing the kernel to you." + eerror "https://sourceware.org/bugzilla/show_bug.cgi?id=5227" + eerror "https://bugs.gentoo.org/262698" + die "Keeping your system alive, say thank you" + fi + + if ! glibc_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' + then + eerror "Your old kernel is broken. You need to update it to" + eerror "a newer version as syscall() will break." + eerror "https://bugs.gentoo.org/279260" + die "Keeping your system alive, say thank you" + fi + fi + + # Users have had a chance to phase themselves, time to give em the boot + if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then + eerror "You still haven't deleted ${EROOT}/etc/locales.build." + eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." + die "Lazy upgrader detected" + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + use hardened && ! tc-enables-pie && \ + ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" + + # Make sure host system is up to date #394453 + if has_version ' /dev/null + local addons=$(echo */configure | sed \ + -e 's:/configure::g' \ + -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \ + -e 's: \+$::' \ + -e 's! !,!g' \ + -e 's!^!,!' \ + -e '/^,\*$/d') + [[ -d ports ]] && addons+=",ports" + popd > /dev/null + + case ${CTARGET} in + mips*) + # dlopen() detects stack smash on mips n32 ABI. + # Cause is unknown: https://bugs.gentoo.org/640130 + myconf+=( --enable-stack-protector=no ) + ;; + powerpc-*) + # Currently gcc on powerpc32 generates invalid code for + # __builtin_return_address(0) calls. Normally programs + # don't do that but malloc hooks in glibc do: + # https://gcc.gnu.org/PR81996 + # https://bugs.gentoo.org/629054 + myconf+=( --enable-stack-protector=no ) + ;; + *) + myconf+=( --enable-stack-protector=all ) + ;; + esac + myconf+=( --enable-stackguard-randomization ) + + # Keep a whitelist of targets supporing IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + if [[ $1 == "nptl" ]] ; then + myconf+=( --enable-kernel=${NPTL_KERN_VER} ) + else + die "invalid pthread option" + fi + myconf+=( --enable-add-ons="${addons#,}" ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(alt_build_headers) + --prefix="${EPREFIX}/usr" + --sysconfdir="${EPREFIX}/etc" + --localstatedir="${EPREFIX}/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_multiarch || echo --disable-multi-arch) + $(in_iuse systemtap && use_enable systemtap) + $(in_iuse nscd && use_enable nscd) + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(in_iuse audit && usex audit || echo no) + ac_cv_lib_cap_cap_init=$(in_iuse caps && usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="${EPREFIX}/sbin" + export libc_cv_slibdir="${EPREFIX}/$(get_libdir)" + + # We take care of patching our binutils to use both hash styles, + # and many people like to force gnu hash style only, so disable + # this overriding check. #347761 + export libc_cv_hashstyle=no + + local builddir=$(builddir "$1") + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # ia64 static cross-compilers are a pita in so much that they + # can't produce static ELFs (as the libgcc.a is broken). so + # disable building of the programs for those targets if it + # doesn't work. + # XXX: We could turn this into a compiler test, but ia64 is + # the only one that matters, so this should be fine for now. + if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then + sed -i '1i+link-static = touch $@' config.make + fi + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then + echo 'main(){}' > "${T}"/test.c + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + mkdir -p sunrpc + cp $(which rpcgen) sunrpc/cross-rpcgen || die + touch -t 202001010101 sunrpc/cross-rpcgen || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + local myconf=() + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(alt_build_headers) + --prefix="${EPREFIX}/usr" + ${EXTRA_ECONF} + ) + + local addons + [[ -d ${S}/ports ]] && addons+=",ports" + myconf+=( --enable-add-ons="${addons#,}" ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + CC="$(tc-getBUILD_CC)" \ + CFLAGS="-O1 -pipe" \ + CPPFLAGS="-U_FORTIFY_SOURCE" \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +do_src_compile() { + emake -C "$(builddir nptl)" || die "make nptl for ${ABI} failed" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +glibc_src_test() { + cd "$(builddir $1)" + emake -j1 check +} + +do_src_test() { + local ret=0 + + glibc_src_test nptl + : $(( ret |= $? )) + + return ${ret} +} + +src_test() { + # Give tests more time to complete. + export TIMEOUTFACTOR=5 + + foreach_abi do_src_test || die "tests failed" +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}$(alt_prefix)" install || die + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + ppc64 /lib64/ld64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if in_iuse suid && ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + cd "${ED}"$(alt_libdir)/.. + [[ -e lib ]] || mkdir lib + cd "${ED}"$(alt_usrlibdir)/.. + [[ -e lib ]] || mkdir lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + cd "${WORKDIR}"/extra/locale + dosbin locale-gen + doman *.[0-8] + insinto /etc + doins locale.gen + + # Make sure all the ABI's can find the locales and so we only + # have to generate one set + local a + keepdir /usr/$(get_libdir)/locale + for a in $(get_install_abis) ; do + if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then + dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale + fi + done + + cd "${S}" + + # Install misc network config files + insinto /etc + doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf + doins "${WORKDIR}"/extra/etc/*.conf + + if use nscd ; then + doinitd "$(prefixify_ro "${WORKDIR}"/extra/etc/nscd)" + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + systemd_dounit nscd/nscd.service + systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf + else + # Do this since extra/etc/*.conf above might have nscd.conf. + rm -f "${ED}"/etc/nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + src_strip +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ ${ROOT} != "/" ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" + fi + + if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then + # Reload init ... if in a chroot or a diff init package, ignore + # errors from this step #253697 + /sbin/telinit U 2>/dev/null + + # if the host locales.gen contains no entries, we'll install everything + local locale_list="${EROOT}etc/locale.gen" + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${EROOT}usr/share/i18n/SUPPORTED" + fi + locale-gen -j $(makeopts_jobs) --config "${locale_list}" + fi + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi +} diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index a5bf3b51ebc1..2aed938db026 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -614,15 +614,18 @@ glibc_do_src_install() { find "${D}" -name "libnsl.a" -delete find "${D}" -name "libnsl.so" -delete - # Normally real_pv is ${PV}. Live ebuilds are exception, there we need + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need # to infer upstream version: # '#define VERSION "2.26.90"' -> '2.26.90' local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) - # Newer versions get fancy with libm linkage to include vectorized support. - # While we don't really need a ldscript here, portage QA checks get upset. if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then - dosym ../../$(get_libdir)/libm-${upstream_pv}.so $(alt_usrlibdir)/libm-${upstream_pv}.so + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die fi # We'll take care of the cache ourselves diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest index 09b1ef3e15a5..e28ddbfa1013 100644 --- a/sys-libs/libomp/Manifest +++ b/sys-libs/libomp/Manifest @@ -14,8 +14,8 @@ EBUILD libomp-3.7.1.ebuild 1368 BLAKE2B 31a4e2b6cea595eedf00655e46a11e235c52a03c EBUILD libomp-3.8.1.ebuild 1368 BLAKE2B b686505a85cd3a343808fa1343d0fa6c31c8e66c43c81f92152553c4e996ba88000def2355ac079e2b7b0755efe064596ed7b51409443a1143287c6a1a26e6e1 SHA512 7ba7b4fccdbc2e9a69f73f5fafd985f862b4b28eb3f775d2650e78a2596826b1d8d947aa6e19f708572409139ea094da0d1c24ee35fb3d8812f8363bd948b3c7 EBUILD libomp-3.9.0.ebuild 1264 BLAKE2B d47970eb3edd24601f97770c326f9274849425ae33aa745cb3544f91a0475944bd1d637b7a50fe3ef0f4643f7fb7adaa91756ca79acf556216362e8c8e1c53b1 SHA512 e0772254fd1ccf735a4325a41bcd30eaaeec30063a541b9f77a5295e1674e0b4a38af86738bfc9a71f4196b81945cd7c08655fc468105aa11d24c38d303aac0a EBUILD libomp-3.9.1.ebuild 1326 BLAKE2B 4e1c5178e66a3d4371556bcb26fab5ea84e2bac1ce0abb127d68bbe09f4e735d6d8ed4404f19bb6d8cb4808a782a5b72c9425e4acd2fe2cc97ebc3372de1c72c SHA512 99afa3364dfe73c52792e1f0c4cc19c9beb1fdb28d7fd009a778c351f86fd1759a1c4bfcd46194890b51f227844c063fed53085d78c0b91351858ed517e42794 -EBUILD libomp-4.0.1.ebuild 2053 BLAKE2B 951e6d1290ded761b9ad5b8b111adc7dcbbdfe6d957001917073a0420fbba5d2aee8ef5c89c06b5ab938dffdbd43d7dd54daff0d16a6258ff7ebfad67f56dc96 SHA512 f6670cf731957f39927d0378b280889ec83aa811bf22980379486c6cfa41e0d4309f4e0ed6a0b7c5b15a72a3b9ee7bbee3f4ee6e3ea396288c1751a32bc63ab2 -EBUILD libomp-5.0.0.ebuild 1889 BLAKE2B f09475c0732e0df8c5d2dc607ec8aeaef786128199ff042311df101e21044053a7f1126d06af6ab094f15a4638e171fbe85b6e34bba3fee5e61d32b49e00fb61 SHA512 0dc4338c9b877c83754a711231369f38f781de447d035623e479aa6b6cec4248b4fa158eb6801e1266066e5ed4528a22a09e0c3738aa6441cb9012c69222c2d0 -EBUILD libomp-5.0.1.ebuild 1889 BLAKE2B f09475c0732e0df8c5d2dc607ec8aeaef786128199ff042311df101e21044053a7f1126d06af6ab094f15a4638e171fbe85b6e34bba3fee5e61d32b49e00fb61 SHA512 0dc4338c9b877c83754a711231369f38f781de447d035623e479aa6b6cec4248b4fa158eb6801e1266066e5ed4528a22a09e0c3738aa6441cb9012c69222c2d0 -EBUILD libomp-9999.ebuild 2043 BLAKE2B b97582b120c1fbcfdbebef908c6efa61b41392aac7c319b2a655c6d40c46335f907aafc229805b4f1b39a56e8ba0ddb7a6395fe2b63a5fec27cc786c432582a7 SHA512 5918ea4691402ef663872dc1482c52853db7ade37b2a68d11a0174a529f67efb033d7270c1e74d0cc38286927ad2d9b1e397e5596e737d4050521e618802ece6 +EBUILD libomp-4.0.1.ebuild 2188 BLAKE2B a59f253ab870927b3cf2adc1682701d8805dda2c52f56529b34ab66987168f1039ef9b285680e8a8ca09fc2dbec48eec55b15ca59cc0ae365c6c5a11e5ad9f2a SHA512 e39909c1b48042fa7da5dd8eab5804721d3775f3c74c196257ded941fa5fafb1b1e697484d9ca96f21797583fcaa381372dbb28a97d0eee4d8993a3dd8d94506 +EBUILD libomp-5.0.0.ebuild 2024 BLAKE2B 1278194f24e5e37ce636fb0269e133d996581d9be8578a0b1bb8aaa29518e2e2936987515ba665a45730889853c42ffe5982474cda58073d612c402c724901ef SHA512 7b39d3a903cf1ee049d2257d14236314965d17b9bc99de8da78252647f42ff3f40e8b26b5763992be1965deca87b61e2f5ffce3c8fdb9a1c739bee30ec958b3e +EBUILD libomp-5.0.1.ebuild 2024 BLAKE2B 1278194f24e5e37ce636fb0269e133d996581d9be8578a0b1bb8aaa29518e2e2936987515ba665a45730889853c42ffe5982474cda58073d612c402c724901ef SHA512 7b39d3a903cf1ee049d2257d14236314965d17b9bc99de8da78252647f42ff3f40e8b26b5763992be1965deca87b61e2f5ffce3c8fdb9a1c739bee30ec958b3e +EBUILD libomp-9999.ebuild 2162 BLAKE2B 09d9069c77be4810e8ee75a66c543c76ce0256713a50d0371d77ec5d804283e64c8a16a16774062b7f4da3efe627a324d07d62b82d7788a40ac113be5bcb3922 SHA512 76183694ec4fce233c288036f52abbc80352c378e9571c026acf58f1ae739506a29a24cb0150407a7d0bdab1b99a945ce8e161f39af5b10b94d0dd0d9c23fdf6 MISC metadata.xml 670 BLAKE2B e059d444954246af28f1e5fde5a5bcda4662965a09fbe77d852e27ee7017e1723937b693c4e057963b71e32b5492660965a15af60087c540dc1161dc1a349a38 SHA512 d4269bb7192e00feed26327bb2ac36db3b1c4f5d55417c22efb9a64fa5a006c17dd39459ecc305e8a9a3a954271ad10013fe5c9159a30ea609513aabddebf485 diff --git a/sys-libs/libomp/libomp-4.0.1.ebuild b/sys-libs/libomp/libomp-4.0.1.ebuild index 2eed580030c3..299e49921e10 100644 --- a/sys-libs/libomp/libomp-4.0.1.ebuild +++ b/sys-libs/libomp/libomp-4.0.1.ebuild @@ -8,7 +8,7 @@ EAPI=6 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python2_7 ) -inherit cmake-multilib python-any-r1 +inherit cmake-multilib linux-info python-any-r1 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" HOMEPAGE="https://openmp.llvm.org" @@ -22,8 +22,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" SLOT="0" KEYWORDS="amd64 ~arm64 x86" IUSE="hwloc ompt test" -# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410 -RESTRICT="test" +RESTRICT="!test? ( test )" RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" # tests: @@ -43,11 +42,19 @@ S=${WORKDIR}/openmp-${PV/_/}.src # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo +CONFIG_CHECK="~!SCHED_PDS" +ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()" + python_check_deps() { has_version "dev-python/lit[${PYTHON_USEDEP}]" } +pkg_pretend() { + linux-info_pkg_setup +} + pkg_setup() { + linux-info_pkg_setup use test && python-any-r1_pkg_setup } diff --git a/sys-libs/libomp/libomp-5.0.0.ebuild b/sys-libs/libomp/libomp-5.0.0.ebuild index f90baa29e665..87c3bfe493f6 100644 --- a/sys-libs/libomp/libomp-5.0.0.ebuild +++ b/sys-libs/libomp/libomp-5.0.0.ebuild @@ -8,7 +8,7 @@ EAPI=6 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python2_7 ) -inherit cmake-multilib python-any-r1 +inherit cmake-multilib linux-info python-any-r1 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" HOMEPAGE="https://openmp.llvm.org" @@ -22,8 +22,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" SLOT="0" KEYWORDS="~amd64 ~arm64 ~x86" IUSE="hwloc ompt test" -# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410 -RESTRICT="test" +RESTRICT="!test? ( test )" RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" # tests: @@ -43,11 +42,19 @@ S=${WORKDIR}/openmp-${PV/_/}.src # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo +CONFIG_CHECK="~!SCHED_PDS" +ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()" + python_check_deps() { has_version "dev-python/lit[${PYTHON_USEDEP}]" } +pkg_pretend() { + linux-info_pkg_setup +} + pkg_setup() { + linux-info_pkg_setup use test && python-any-r1_pkg_setup } diff --git a/sys-libs/libomp/libomp-5.0.1.ebuild b/sys-libs/libomp/libomp-5.0.1.ebuild index f90baa29e665..87c3bfe493f6 100644 --- a/sys-libs/libomp/libomp-5.0.1.ebuild +++ b/sys-libs/libomp/libomp-5.0.1.ebuild @@ -8,7 +8,7 @@ EAPI=6 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python2_7 ) -inherit cmake-multilib python-any-r1 +inherit cmake-multilib linux-info python-any-r1 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" HOMEPAGE="https://openmp.llvm.org" @@ -22,8 +22,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" SLOT="0" KEYWORDS="~amd64 ~arm64 ~x86" IUSE="hwloc ompt test" -# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410 -RESTRICT="test" +RESTRICT="!test? ( test )" RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" # tests: @@ -43,11 +42,19 @@ S=${WORKDIR}/openmp-${PV/_/}.src # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo +CONFIG_CHECK="~!SCHED_PDS" +ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()" + python_check_deps() { has_version "dev-python/lit[${PYTHON_USEDEP}]" } +pkg_pretend() { + linux-info_pkg_setup +} + pkg_setup() { + linux-info_pkg_setup use test && python-any-r1_pkg_setup } diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild index 6b0c0b5b8014..4d5905215164 100644 --- a/sys-libs/libomp/libomp-9999.ebuild +++ b/sys-libs/libomp/libomp-9999.ebuild @@ -8,7 +8,7 @@ EAPI=6 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python2_7 ) -inherit cmake-multilib git-r3 python-any-r1 +inherit cmake-multilib git-r3 linux-info python-any-r1 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" HOMEPAGE="https://openmp.llvm.org" @@ -24,8 +24,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" SLOT="0" KEYWORDS="" IUSE="hwloc ompt test" -# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410 -RESTRICT="test !test? ( test )" +RESTRICT="!test? ( test )" RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" # tests: @@ -43,11 +42,19 @@ DEPEND="${RDEPEND} # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo +CONFIG_CHECK="~!SCHED_PDS" +ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()" + python_check_deps() { has_version "dev-python/lit[${PYTHON_USEDEP}]" } +pkg_pretend() { + linux-info_pkg_setup +} + pkg_setup() { + linux-info_pkg_setup use test && python-any-r1_pkg_setup } -- cgit v1.2.3