diff options
author | Stuart Shelton <stuart@shelton.me> | 2016-02-18 16:46:37 +0000 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2016-02-18 16:46:37 +0000 |
commit | a2d774443386ad315849dd5a8f0187e6d2d9f9f5 (patch) | |
tree | 61c234c423fe0818ffb00d03aa96f982e0af7ba1 /sys-libs/glibc | |
parent | Update app-emulation/docker-1.7.1 (diff) | |
download | srcshelton-a2d774443386ad315849dd5a8f0187e6d2d9f9f5.tar.gz srcshelton-a2d774443386ad315849dd5a8f0187e6d2d9f9f5.tar.bz2 srcshelton-a2d774443386ad315849dd5a8f0187e6d2d9f9f5.zip |
Add sys-libs/glibc-2.21-r2
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r-- | sys-libs/glibc/Manifest | 2 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.21-r2.ebuild | 263 |
2 files changed, 265 insertions, 0 deletions
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index 4bf1d7c1..4ed71b70 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -33,9 +33,11 @@ DIST glibc-2.20-patches-1.tar.bz2 78477 SHA256 b3b1c4022503dc433cc4969534f27ee01 DIST glibc-2.20-patches-5.tar.bz2 55986 SHA256 3d3eec9ac9b5d0530f9e05614f4646d64ff93a48865b42c156990bea69247cda SHA512 409f59a028127e02f0c9f91107715b540d8d234475830adc17108a02664be232098d119b43bcc8df9b328ab50c1fffb0868d510e6487ce1c34ec2c7c7a78375b WHIRLPOOL b3c41b01af5d8ae8e901ac48ae124e13ff1c76fbeb35315cb9630c648c03d7abbfb753294cbdfe1dc939bda260e24d8450ffb19cfe5c255b32f8c5500f2c43f3 DIST glibc-2.20.tar.xz 12283992 SHA256 f84b6d42aecc288d593c397b0a3d02260a33ee686bce0c634eb9b32798f36ba5 SHA512 7a8eea8b71d3ccba766c3f304cab61055446d451ef063309476b26dc40d880562dc33b1b68fbedeedb4b55b84c26415b9202311aaa71ef8c141b6849a814d2fa WHIRLPOOL 042f74d75c62a655ae35348c9cd0bed0845ab199e37a76635eb74c04ed927b5eca77723c38d2dc46f12fca62c1004001887b43946a914b079ad22f6a9cc8daaa DIST glibc-2.21-patches-5.tar.bz2 34237 SHA256 8f6a5dd094ad2c4b82368ef4b081ce6c634f61ea2783cdc68bcd9250d61682e1 SHA512 19b0e706cee387aa3a9ed40dd20081ffe98eaaf9a5ca027ee4abd3e46c3403af06c5189bd764d8d477cb356507e1142b5fde852ec710cf24e108c307f5843837 WHIRLPOOL 96c4ec00af41c60c238f681ea5448cec4db11dc59b4853eed5ba700aa21f804de2443166aa48d30f76af6b1a2eb74a47a7d1163e2067e5bbdcdbe3e4bf2a38c4 +DIST glibc-2.21-patches-7.tar.bz2 46894 SHA256 49126df6f4b819f2c315cca0a07e9b8ee7e279257148506d336ccfef5766bbcb SHA512 e4cca3d753c0b9d213c0ed85e3d08cbbf6517862b3a48af987e010abaf5a022b47330040ced183d30b5b934de7587e97b4342e51a6df3d5cfa768bdd8b43b756 WHIRLPOOL b5f4bffdcaf629d735e7498f509bf2130acb18194b18e69747bb6c3e403b221f2163eea3770bb19c05253d7134f70ed4657d7c30c5978f7b5571a3482f9521ad DIST glibc-2.21.tar.xz 12322092 SHA256 aeeb362437965a5d3f40b151094ca79def04a115bd363fdd4a9a0c69482923b8 SHA512 8cded6693618bec115f678fcbd0b77556f97dfa8337608f66e37224aefa55b38765ba61cb4d58beea37b5934e5ec8e30bad58613707388484906f2a0ce77997d WHIRLPOOL d07fec32bd92eade065a3b6170932b8bd41d07df4aa69dd5a860ebb9678c22bd1e20bf88b1fc05c3ecc18e709c0a63118e12525dc668e0399d7ef7fe4454702d EBUILD glibc-2.17.ebuild 9861 SHA256 8eb91db71e5cc118fd62768d4d37b21abe263efd364292aa743c19fb64de0ed0 SHA512 1469b87e36f2fd341cf116889013bda82663502ce99653042bfdeb91f2abfd5f8912b3876fa1375dc520e63443aeb6c78766f548fecbdbfe2fedf920477fe8f6 WHIRLPOOL 8fedea6b0653ba1bc83e4b7329cd9ebafe9665057301c3385439a030dbefae3efc1536b9ca9b18a43ceca57cea92df6e850e17b54f6ebff934e88b302adb3547 EBUILD glibc-2.19-r1.ebuild 9774 SHA256 8b410fabf2220cb0ff957cd914190c2eadde81ed7642d4dc4bb91154c7c683ac SHA512 ca2f28ff47677e305b3143ad1671eadebf680ea2a8fd3f81a21b5ba615f1dfda9b68476779b39f908e072d795640266f13d5cc50dbc77b7cdb8e56c9fed8df6b WHIRLPOOL 96265f35a0738add729430379bbc7b8bad68c4224e17e50c06d4d5f6b43918a3e8692c33bb6f5ba089ba250a5138ab1635b1a4d04c55dfb2fefeab36865a1ddf EBUILD glibc-2.20-r2.ebuild 9337 SHA256 99d079aff48b8d59ba58c10d43af79f48a33ea3fce9c90a1f6e8bea7826d597e SHA512 7336b2758458e7141980a77a7ca7ee4abd8308f54ce10bcb00eb0811b6051f3e85eba0f0709b0203f15b141810b45c27feb039c8195ecfe9bb078010cbb3d97c WHIRLPOOL 20f7c4441cfd4d79ae852c52bba2b7f548f76f3d80ae2c4f242ba6decd4497758a3ca01b5a103991df77e704af685aaf89713310f4e461989861ba7735b19e7e EBUILD glibc-2.20.ebuild 8965 SHA256 9592457321736c9a1f37cfe6584607fd8d3064371cab08fb17b0afcba986e8e9 SHA512 d71d7052484d091b8293f6c6f65a3771ca969bcd67ed35a24e77cb6543dba574a88e053de2a22f93f9dcdb073ee4eccd7b5dd7b817324fa0ceb462dda32151f6 WHIRLPOOL 6257e5bab83b1379d4f6ff422d6cdafae5a8e2bfa301ee199580ad53c499dc5935c11774af90d6389b2ed7380507d32d1de33cdd8dc03f358cfa90ca3ca90e34 EBUILD glibc-2.21-r1.ebuild 9312 SHA256 465f3766f258d7c575d9b8a4345be487174f4b38a27857d4c7c99862abb5936c SHA512 69616d9eab988347ed3feca4ed9ee33d437cd7fd7902e4b2051e6c8ff71911acfeb8baad7596f7d6f4ad3d28ad1ace0ba101f06b10b049c9a6398ceae55355c3 WHIRLPOOL cbce72e91feeb6272dd5431aa158647f903f0787ebd10697e99547d5e8455e144af1305efa71b475453da3c4ad630eb9f2f2dfe4889c96755a1f78956bb9770e +EBUILD glibc-2.21-r2.ebuild 9312 SHA256 19aef8681a6014afc38a52fbcaa033025ff63b044af8fa0b948f4acaaed4d245 SHA512 d1997e9089a8b8ac02980d0f26f04776f3b8bddc83cc5bd1ec49468a4ea8e4495da47f20150de16e1183c1500a06039659724a048c305b41722cddc7c7f5f51a WHIRLPOOL 6716320e8aceb801386db708aa66f0e2d7e2625d5ee45262af3ca5441842c8afb81e3c141c0277b78e82f8f08041deeebb6bd6d2571c3109c18c964eda9be20a diff --git a/sys-libs/glibc/glibc-2.21-r2.ebuild b/sys-libs/glibc/glibc-2.21-r2.ebuild new file mode 100644 index 00000000..2b471b20 --- /dev/null +++ b/sys-libs/glibc/glibc-2.21-r2.ebuild @@ -0,0 +1,263 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id: 76e250beb6fadcb43a53767c2925740cd6b5a50d $ + +EAPI="4" + +inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib systemd unpacker multiprocessing + +DESCRIPTION="GNU libc6 (also called glibc2) C library" +HOMEPAGE="https://www.gnu.org/software/libc/libc.html" + +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" +RESTRICT="strip" # strip ourself #46186 +EMULTILIB_PKG="true" + +# Configuration variables +RELEASE_VER="" +case ${PV} in +9999*) + EGIT_REPO_URIS="git://sourceware.org/git/glibc.git" + EGIT_SOURCEDIRS="${S}" + inherit git-2 + ;; +*) + RELEASE_VER=${PV} + ;; +esac +GCC_BOOTSTRAP_VER="4.7.3-r1" +PATCH_VER="7" # Gentoo patchset +: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires + +IUSE="debug gd hardened multilib nscd selinux systemd systemtap profile suid vanilla crosscompile_opts_headers-only" + +# 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} ]] +} + +# Why SLOT 2.2 you ask yourself while sippin your tea ? +# Everyone knows 2.2 > 0, duh. +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. +DEPEND=">=app-misc/pax-utils-0.1.10 + !<sys-apps/sandbox-1.6 + !<sys-apps/portage-2.1.2 + selinux? ( sys-libs/libselinux )" +RDEPEND="!sys-kernel/ps3-sources + sys-apps/gentoo-functions + selinux? ( sys-libs/libselinux ) + !sys-libs/nss-db" + +if [[ ${CATEGORY} == cross-* ]] ; then + DEPEND+=" !crosscompile_opts_headers-only? ( + >=${CATEGORY}/binutils-2.24 + >=${CATEGORY}/gcc-4.6 + )" + [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" +else + DEPEND+=" + >=sys-devel/binutils-2.24 + >=sys-devel/gcc-4.6 + virtual/os-headers" + RDEPEND+=" vanilla? ( !sys-libs/timezone-data )" + PDEPEND+=" !vanilla? ( sys-libs/timezone-data )" +fi + +upstream_uris() { + echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 +} +gentoo_uris() { + local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" + devspace=${devspace//HTTP/https://dev.gentoo.org/} + echo mirror://gentoo/$1 ${devspace//URI/$1} +} +SRC_URI=$( + [[ -z ${EGIT_REPO_URIS} ]] && upstream_uris ${P}.tar.xz + [[ -n ${PATCH_VER} ]] && gentoo_uris ${P}-patches-${PATCH_VER}.tar.bz2 +) +SRC_URI+=" ${GCC_BOOTSTRAP_VER:+multilib? ( $(gentoo_uris gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2) )}" + +# eblit-include [--skip] <function> [version] +eblit-include() { + local skipable=false + [[ $1 == "--skip" ]] && skipable=true && shift + [[ $1 == pkg_* ]] && skipable=true + + local e v func=$1 ver=$2 + [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" + for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do + e="${FILESDIR}/eblits/${func}${v}.eblit" + if [[ -e ${e} ]] ; then + source "${e}" + return 0 + fi + done + ${skipable} && return 0 + die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" +} + +# eblit-run-maybe <function> +# run the specified function if it is defined +eblit-run-maybe() { + [[ $(type -t "$@") == "function" ]] && "$@" +} + +# eblit-run <function> [version] +# aka: src_unpack() { eblit-run src_unpack ; } +eblit-run() { + eblit-include --skip common "${*:2}" + eblit-include "$@" + eblit-run-maybe eblit-$1-pre + eblit-${PN}-$1 + eblit-run-maybe eblit-$1-post +} + +src_unpack() { eblit-run src_unpack ; } +src_prepare() { eblit-run src_prepare ; } +src_configure() { eblit-run src_configure ; } +src_compile() { eblit-run src_compile ; } +src_test() { eblit-run src_test ; } +src_install() { eblit-run src_install ; } + +# FILESDIR might not be available during binpkg install +for x in pretend setup {pre,post}inst ; do + e="${FILESDIR}/eblits/pkg_${x}.eblit" + if [[ -e ${e} ]] ; then + . "${e}" + eval "pkg_${x}() { eblit-run pkg_${x} ; }" + fi +done + +eblit-src_unpack-pre() { + case $(gcc-fullversion) in + 4.8.[0-3]|4.9.0) + eerror "You need to switch to a newer compiler; gcc-4.8.[0-3] and gcc-4.9.0 miscompile" + eerror "glibc. See https://bugs.gentoo.org/547420 for details." + die "need to switch compilers #547420" + ;; + esac + + [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 +} + +eblit-src_prepare-post() { + cd "${S}" + + epatch "${FILESDIR}"/2.19/${PN}-2.19-ia64-gcc-4.8-reloc-hack.patch #503838 + + if use hardened ; then + einfo "Patching to get working PIE binaries on PIE (hardened) platforms" + gcc-specs-pie && epatch "${FILESDIR}"/2.17/glibc-2.17-hardened-pie.patch + epatch "${FILESDIR}"/2.20/glibc-2.20-hardened-inittls-nosysenter.patch + + # We don't enable these for non-hardened as the output is very terse -- + # it only states that a crash happened. The default upstream behavior + # includes backtraces and symbols. + einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" + cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die + cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-chk_fail.c debug/chk_fail.c || die + + if use debug ; then + # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested. + sed -i \ + -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ + -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ + debug/Makefile || die + fi + + # Build various bits with ssp-all + sed -i \ + -e 's:-fstack-protector$:-fstack-protector-all:' \ + */Makefile || die + fi + + if [[ "${ARCH}" == "amd64" ]]; then + local LD32="$( get_abi_LIBDIR x86 )" + local LDx32="$( get_abi_LIBDIR x32 )" + local LD64="$( get_abi_LIBDIR amd64 )" + local -i LD32l LDx32l LD64l + (( LD32l = ${#LD32} + 1 )) + (( LDx32l = ${#LDx32} + 1 )) + (( LD64l = ${#LD64} + 1 )) + + # In order for this to work, LD64 and LDx32 must share a common root of + # LD32. If this is not the case, then sysdeps/unix/sysv/linux/x86_64/dl-cache.h + # will need to be re-implemented. + + local LDx32s="${LDx32#${LD32}}" + local LD64s="${LD64#${LD32}}" + + einfo "Using the following libdir paths:" + einfo " 32-bit libraries in '${LD32}'" + einfo " Long-mode 32-bit libraries in '${LDx32}'" + einfo " 64-bit libraries in '${LD64}'" + + cd "${S}" + + sed -i \ + -e "s:/libx32:/${LDx32:-libx32}:g" \ + sysdeps/unix/sysv/linux/x86_64/x32/configure \ + || die 'configure patch failed' + + sed -i \ + -e "/FLAG_ELF_LIBC6/{s:/lib/:/${LD32:-lib}/:}" \ + -e "/FLAG_ELF_LIBC6/{s:/libx32/:/${LDx32:-libx32}/:}" \ + -e "/FLAG_ELF_LIBC6/{s:/lib64/:/${LD64:-lib64}/:}" \ + sysdeps/unix/sysv/linux/x86_64/ldconfig.h \ + || die 'known_interpreter_names replacement failed' + + # if (len >= 6 && ! memcmp (path + len - 6, "/lib64", 6)) \ + # { \ + # len -= 2; \ + # + # else if (len >= 7 \ + # && ! memcmp (path + len - 7, "/libx32", 7)) \ + # { \ + # len -= 3; \ + # + # if (len >= 4 && ! memcmp (path + len - 4, "/lib", 4)) \ + # { \ + # memcpy (path + len, "64", 3); \ + # add_dir (path); \ + # memcpy (path + len, "x32", 4); \ + sed -i \ + -e "/ memcmp /{s:len >= 6 :len >= ${LD64l} : ; s: 6, \"/lib64\", 6): ${LD64l}, \"/${LD64:-lib64}\", ${LD64l}):}" \ + -e "/len -= 2;/{s:len -= 2;:len -= ${#LD64s};:}" \ + -e "/else if (len >= 7/{s:len >= 7:len >= ${LDx32l}:}" \ + -e "/ memcmp /{s: 7, \"/libx32\", 7): ${LDx32l}, \"/${LDx32:-libx32}\", ${LDx32l}):}" \ + -e "/len -= 3;/{s:len -= 3;:len -= ${#LDx32s};:}" \ + -e "/ memcmp /{s:len >= 4 :len >= ${LD32l} : ; s: 4, \"/lib\", 4): ${LD32l}, \"/${LD32:-lib}\", ${LD32l}):}" \ + -e "/memcpy /{s:len, \"64\", 3):len, \"${LD64s}\", $(( ${#LD64s} + 1 ))):}" \ + -e "/memcpy /{s:len, \"x32\", 4):len, \"${LDx32s}\", $(( ${#LDx32s} + 1 ))):}" \ + sysdeps/unix/sysv/linux/x86_64/dl-cache.h \ + || die 'dl-cache.h modification failed' + + einfo "dl-cache.h now contains:" + cat sysdeps/unix/sysv/linux/x86_64/dl-cache.h + fi +} |