diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2014-12-28 17:11:35 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-12-28 17:11:35 +0000 |
commit | cbc9c51bcf48e903e03746fd47260ea54935ceae (patch) | |
tree | 7e17eeff6a3c3cc8752a7314f1612cd944b83d65 /sys-libs | |
parent | Version bump (diff) | |
download | historical-cbc9c51bcf48e903e03746fd47260ea54935ceae.tar.gz historical-cbc9c51bcf48e903e03746fd47260ea54935ceae.tar.bz2 historical-cbc9c51bcf48e903e03746fd47260ea54935ceae.zip |
Address bug #478764 in 2.20-r1
Package-Manager: portage-2.2.14/cvs/Linux x86_64
Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/glibc/ChangeLog | 7 | ||||
-rw-r--r-- | sys-libs/glibc/Manifest | 30 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.20-r1.ebuild | 188 |
3 files changed, 210 insertions, 15 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog index 159c3e34ee4a..3db6876a0b54 100644 --- a/sys-libs/glibc/ChangeLog +++ b/sys-libs/glibc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-libs/glibc # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.1031 2014/11/11 02:08:50 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.1032 2014/12/28 17:09:09 blueness Exp $ + +*glibc-2.20-r1 (28 Dec 2014) + + 28 Dec 2014; Anthony G. Basile <blueness@gentoo.org> +glibc-2.20-r1.ebuild: + Address bug #478764 in 2.20-r1 11 Nov 2014; Mike Frysinger <vapier@gentoo.org> +files/2.20/glibc-2.20-hardened-inittls-nosysenter.patch, glibc-2.20.ebuild, diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index d7c5faa0b284..a8348a91e05a 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -69,6 +69,7 @@ DIST glibc-2.19-patches-1.tar.bz2 75062 SHA256 0f4a9be17a659be02079d4e3bbbe04d3c DIST glibc-2.19-patches-3.tar.bz2 80664 SHA256 6fb03292e224199e0dd9ba7ee83aca723e1560f26831e85cdc6302b187c6de3c SHA512 d281d6a2757920124cf8a3f02b97e75192598b08d96ae48840df34c7ffdcb212952d171f233e6f12a429b19437d0a296212fe1f2eae164d6a1c6793cb3cb69f0 WHIRLPOOL 6f28a2d0dff42e8ad0e77859938e3093753f77f78821375777eebb2db5568bf1c56e8b8208f02280f23acb2dd26dc8a313fedd5b2c10755f1659e6d324a1dbc3 DIST glibc-2.19.tar.xz 12083312 SHA256 2d3997f588401ea095a0b27227b1d50cdfdd416236f6567b564549d3b46ea2a2 SHA512 9e021fcb3afbb9ace2a0e37fded231a62de861bd766e29d47163a03182e37add718b7acc3963d1c525f9556773e842297725715acde48dcfbaab6e756af1a23d WHIRLPOOL 9581a3a23ebdd56bc559b56b95b7bcd21ca039546ec19c6c0e4e0738597542164fdb21ab1d1f36d5e73a205fb51f0974c7d497972615bce69ae002298f6475b6 DIST glibc-2.20-patches-1.tar.bz2 78477 SHA256 b3b1c4022503dc433cc4969534f27ee019ab695aed8b722e914d7fb864db5606 SHA512 56e954f11610fa4f9fffc68bdad98114bed7592f5a4f8bd81a0306ee99311db8cb4dd4469a6f2a5a60ff4a9e6d172e49971d389f1b2911df7a408571737c1ee1 WHIRLPOOL 02aeda854ca220ed3b4fe41510d918a8fc4fb9e95a3761a3884e2d2d3c0a515c82e835d7a74e41dc0a20c865de120b60ea4e561cd3f25534568981c8084dce00 +DIST glibc-2.20-patches-2.tar.bz2 78422 SHA256 ecf83241b308e487895e0daf1b796f79ca34f4f64e5dc7dfab338f5ea7b3b310 SHA512 91920bec2415e7a2c2796553bdd6e1e2605cf3c68118374d253a15f8a578f8cc4bfc020f07e8359cbe157ed34c0e68fd106adf223d4bbad2cc1c53a8f83be075 WHIRLPOOL cd711a7885a627a13bdc9e5af88ef3b3a22068927a078ff81ff31db76249aec3475a5884287e522fa9e9b705bad907b573cc7bd0d354c05981014c2fb87c8078 DIST glibc-2.20.tar.xz 12283992 SHA256 f84b6d42aecc288d593c397b0a3d02260a33ee686bce0c634eb9b32798f36ba5 SHA512 7a8eea8b71d3ccba766c3f304cab61055446d451ef063309476b26dc40d880562dc33b1b68fbedeedb4b55b84c26415b9202311aaa71ef8c141b6849a814d2fa WHIRLPOOL 042f74d75c62a655ae35348c9cd0bed0845ab199e37a76635eb74c04ed927b5eca77723c38d2dc46f12fca62c1004001887b43946a914b079ad22f6a9cc8daaa DIST glibc-2.9-20081201.tar.bz2 16430489 SHA256 6f8e515775e20ed48610860d10315adda418a3649b3465f36ee5cd467364a8f6 SHA512 bdd3f5b61f741f09da21020ceef95e8e4f22574d11f8f2341f573ab2225baaf68698446ec26cbc4a63a21a8a400eaf5820fce4bd89c3e1dcf52172a62df561f4 WHIRLPOOL 37e4875e450e8a4067f657b4d71be184844cd45c0d7dbd9242e8f998aab4e15c732fc64ba148c5782078873182d4b132c911da9242b0513eea96a2338aa04722 DIST glibc-2.9-patches-8.tar.bz2 106638 SHA256 5f1f8b569ac02c2f538bebd64d137bccb442ddfcb28b3ef17b86134edd8e3f6c SHA512 f5070bf45c28bcf455f53bee85414e6efa1da3cdbc51425a1bc67fb92ff793d1416d5743a48e69080e636d80e41463c5897d437190d496c0b34f7dcf158e8d9c WHIRLPOOL f15b98a7bd6a8cbfaa9c6e1ad7204de875876bf1640c2a008532537cf65b811b42c45446dba846f6e572e9d763cb6afbe878920a51f772c7367cc7a6f615f4b7 @@ -99,26 +100,27 @@ EBUILD glibc-2.17.ebuild 6958 SHA256 3cb1baca3b8469757ee4c5cdb6b6aef07e19a6041ff EBUILD glibc-2.18-r1.ebuild 7021 SHA256 308a57802e31f6ec4a2ab6be491bcf679707a6a7c479b07dc754ec5eb448ab2b SHA512 8aaf3908bb7db5d315efdb01fa90eb4c783ef91e3efbb6ea006308aa4fb21669be76320d5428130816ada222fca5bea3e16882eb231a16640c55456834a53b97 WHIRLPOOL d00f4bb51366cee03c9007b8072c1dbeb5a7002158f43517a8242b07cd82058c053a3061a0affc1fb4c129f457c90e81af78b2ceb87fc8942e7d67bc264e140a EBUILD glibc-2.19-r1.ebuild 6903 SHA256 95acb9caf384d01a5c89af7242c72f40c5c2a8c219683c4096f65dd59e34668f SHA512 14a33b61b20acb6993b07b4842c76f3602e9d0ae2f07a44e0501831080c3730373aa5f02c96f328c47fde89e60839ec85f4dd98c4f6b515eacf03d1ab0795df8 WHIRLPOOL 1b3883b5a2641687fd46df89e140e0e332da0933fc60426906c6afaa9d825d6fdc2fea0de1a95c7a74736e96adb346c660aaf5ef0597e2c5324e716cf86873b0 EBUILD glibc-2.19.ebuild 6912 SHA256 3a11e60bed77cc2dad678ad97ed7a959a59a91a94ca28fd4d7d8776a6217a00f SHA512 70c9b91f224c276783b96ae60f57ac48886861fda71be6e6e292840b4c8cc0fea798005c26c6c33f198c63fb2c38bf78e994821dfa010086ba7ece443257b851 WHIRLPOOL 98be39cc52c7d8431e46f24f9552db63980f4a38c8e12aaffd4b08c7c66f8931a16fd7deb99e43a5bb330a42e6c1e722a9a8f74d1fe97523d7b4bfe75c9accf5 +EBUILD glibc-2.20-r1.ebuild 6215 SHA256 544ac982caa3f0d2b843efd1869befd7782ea0f02f86dea409e024865bb1966f SHA512 4bfdf69f5ce6dc0d10a4ef2cc7ff202d10785f08e54f4612e1aff3d0d5bf4159c3ed2604d075cdad9945e54209d18aa6cc167ffba5ef3eda5e706b8bea5680dc WHIRLPOOL 414c2f28765ae45a81b92e29a5d7e8be964f2ef2c3c3e3e8ecb04014a4c14d136e6fd23913e39380e96d5347c3179d2d90cda6947643602192d98ec7b861d4f8 EBUILD glibc-2.20.ebuild 6159 SHA256 60cd13aa057dedf49026f440b2d0f46ae36374689d2085a7209dfb991939e0e5 SHA512 f9f64226f1d42c7db42b0c221e53e58cf22df6768f3a4e64367d8537ed232cf3566848c6210dd77a287edca05e2d952a5953ec750dc97a3c878847f06c5c0f56 WHIRLPOOL dadc71db6048b4ba75bf63e1e825f5f8ebc45f64947d9463e2a867ec5323a6c8e6d34d269c4632aa54d31cf743e63ecd6484eaa00271128c44da19dc1b809310 EBUILD glibc-2.9_p20081201-r3.ebuild 6787 SHA256 3d9ff2b86df088b8e8cc082c5ddef164b48cffcccfa2ea001306e79a6d52a52c SHA512 7070020105a777bbf6d846fab291b238d7861472c737031e8c52b6d5c2a0524e228b724751325448ce94a42ee39112088b91d0597cd2cdbcc68c51248d2d5a11 WHIRLPOOL aa0e2d11377c3a30478afbef0fa3daa12aa9711d68dc92ab08fca999e599c613648644da2e6f81c38dc98192ed26934c4a35418a97d3146650cd4c82e39a7fed EBUILD glibc-9999.ebuild 6161 SHA256 edd7f2121c825107d5c73b434fddd13191b49f383b7ddc1341a7be43309458f9 SHA512 49298fd32c4198b0b29287c4c533d40a1f006b225a0e3c7d354616fadf111a432a6af43e54e52fbf4f78e853dddff53055675c1917d9ae003e1a9eedd54dfbba WHIRLPOOL 965a39295ece50567d45d5114d9ac37f7774160c51cabdb2acfdf391f47657bd8947e24520fe55e9d2c760dda7764044a32e0122a3af81fe14630d114008248e -MISC ChangeLog 72496 SHA256 a7eb1f7f0b0e3fb2e3ca83da3af4bf056332883182e1fadecc0b8817581da34b SHA512 7842ec0542493b535f19f5e4c35b0cfca33141b4d0701dba449e44b8752192a14f69915e36050729c1226c6c4e1a4e941a5d7fd37499c25b9e63862424aaf484 WHIRLPOOL 0e7de83f638a0796eb0f6e7cafaf90e1d580c9cdc0f68dff4876c8d56d297d9bd6f60173aa12205c9ef8fcd13706356c0ae9a55155dcc9576ab545508d8b4260 +MISC ChangeLog 72640 SHA256 2aec55ffda5e7c0e33b8e3158744439c7f1e3002981c90e6e18bf880344c0d27 SHA512 20aeaac812192d4466aa62f0c9d0bc47234696876ff11a8e46bd01b146e7a97a22ee8324587a6a444c9e914e87e6c692f809060bab38addbb5b0aff63341230b WHIRLPOOL 66bb0ba641f98eda012ecb2e88e2238d069029055858de310ec150bd235e4b573c6026c58da271d24173b6fc8ab9b33a3e30bb62f9cf04c6402392887ae103e0 MISC ChangeLog-2007 108548 SHA256 d622be202eb0d61a363b0ae4065012cd1d494fefaa0c03d4aa7986177cdde6d0 SHA512 fdb3f311a3be4b97a6acfceb1763af5ea69e74d8195522c5d03307f75e15a9382991e9e29dbfdec79e74f1c36328f82648768749bc929e5050ff64b628c7ca98 WHIRLPOOL e550f354394569069e000a7e70ec69c94388a0f415c19b427203f0dcbcbeeec0f5e379ee2af7886cd2d68559e749fab8122e7e077985729d7e0e728ae9096d7a MISC metadata.xml 724 SHA256 b9d8df62b36ae314b29a3177c534495036ef97a819c152247383e907004fe4dc SHA512 8c215338bbf47de95f40f9f24c50d107ec0bbe4a47282d3cbc253d4003db85a88c542aee33756dd9d2d2ec4c70992009261d821a8c145c24c24d2ad448595b77 WHIRLPOOL 954f5d080c7219ffe85e128eddd05c74a32a457219d423441bb58d54a7de1786da6a2efb541861b3bfc93a9acf2ae6f79168d1ccc37385f84af0eb439fff2954 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQIcBAEBCAAGBQJUYW+0AAoJEPGu1DbS6WIAJ+8P/3nKGpe3LFf7D7XE+AUi9Eer -Q4rPSc0PRf04iyHhXCOq7RfVMd91KDDTmWGMb5Se/xrts/jW15QrEyC7OGwRlUEn -j54UIy/5CPXXfhSEcpNOcbva6GZbhDZi62ce442ZhUSazfzlXr6NBjtwc5xohvIG -cw6h3FFXl2OuluIaSleB7NY4xk4WfriUBWGP66vwx1qUFMMUHgKEKfJUVO8T1ToC -n6dYWZ2XjyHh3VS6Jy1++//dBBvIOQcf1HnQyxzsz503cVdKxejIFtSHMVqxiw3B -uZ0Nc+BJE9Ix1SdMD4AHNEr0EBMHAj8MyeJ8wPEgRdC9KdO8VmDinWwxXxu9akfD -uGvQPLztjM7cfvjnhTxSYq5ee9p24DIdNW+00lDBptVphEdziTdmgQkYkz3XPbx3 -Ej9qjrrEvYhj/0sWwGs09Xx/Z18VZEC1wfPe5lxqDENOpc5Yher4pqOw7WnJx/es -3YiSLuHvFp4BR8nVKCWZD/Gf/1TAfqe1BS+rwpmWiScqywBgyqlNMN6HT5IzL2SY -fBW3wlJC6+IW0V9VdaaCeXwYnIkV2mKaJbk7zZ9bESd+iDHO8ZXtj3tFWAVv2yfz -K2rI7tf2VzZ6M2jf6pqSMT2BJKpI/U29o0TEL8DpO0hMGwFVv8s+kU6dCQ6H2dVZ -DtIvMyOZ1tmy0lcctYA1 -=64f5 +iQIcBAEBCAAGBQJUoDnxAAoJEJOE+m71LUu6C6sQAKaJH9fmku4HhOlq/Dcff4AR +sDvU0EHSgIu+XDmIGliSY3BZbP5GO2CFsyziF3jbCaBZvbsjnB5oCLywJnipBQ0X +gGOSmToPuDzGumZq2ccrBJuLmRavr6rxAZCYvm9pzP7qINlBQrBDlFWDmIGs4f+v +RgSH9/SOq5fouuEp3hU9KxmMgiZTkhYOrqWWryIcp9H4WupflRbJoX4TqERqvba2 +kEhPsoTLkPLz32Tvy1kuJIn5m8/COEMmkKCYXJ6TV5wJo9XYxL69zytfXIs7biHn +87fU3R0SZW4zFUOfTW34g2aAwSPt02TOhh9vHUARE8wNmev93GT0QoL1Gh5wTIGM +gwjinriEfYxgzaf42Nux7CexLyzeFScdXtaLyGWAIWjCeZKADgVwWX57T4B5+duE +rw5ekE4nJQGFRjSmQNNADoqRCJJWxHLgKvjtThfQePcWahmcjjcxbXLVJq5oWx8b +34ZsxbImjSMGc/b/MrA3p6NLorTcYfevudV+ExtSDSQmMLLixEetD4kdGdxFBEwJ +55Iz8KOle+7yXBpywDeJ5G8GZqSHKtaLwmfdlXBNKTBSZ7qz0j0X9tKU5Rhtl02H +t6ySa0pUmxH8avS/iEpZAvSpv/J7l+5ANNWz9s7k+zdgLoRHjd1O7X4AJ2z3VDNE +VszdmWi2hZG6kC5n0WJS +=Y9cK -----END PGP SIGNATURE----- diff --git a/sys-libs/glibc/glibc-2.20-r1.ebuild b/sys-libs/glibc/glibc-2.20-r1.ebuild new file mode 100644 index 000000000000..7f834e4a7e06 --- /dev/null +++ b/sys-libs/glibc/glibc-2.20-r1.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.20-r1.ebuild,v 1.1 2014/12/28 17:09:09 blueness Exp $ + +EAPI="4" + +inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib systemd unpacker multiprocessing + +DESCRIPTION="GNU libc6 (also called glibc2) C library" +HOMEPAGE="http://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="2" # Gentoo patchset +: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires + +IUSE="debug gd hardened multilib nscd selinux 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.4 + )" + [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" +else + DEPEND+=" + >=sys-devel/binutils-2.24 + >=sys-devel/gcc-4.4 + 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 HTTP~blueness/glibc/URI" + devspace=${devspace//HTTP/http://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 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() { + [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 +} + +eblit-src_prepare-post() { + cd "${S}" + + 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 +} |