From d98183ef3fa5c6cdd962f574eedfc74a0778b7e9 Mon Sep 17 00:00:00 2001 From: Magnus Granberg Date: Sat, 31 Aug 2013 11:45:41 +0000 Subject: Bump piepatch and new gcc-spec-env for gcc 4.8.1 (Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key FD79807F) --- sys-devel/gcc/ChangeLog | 6 ++- sys-devel/gcc/files/gcc-spec-env-r1.patch | 87 +++++++++++++++++++++++++++++++ sys-devel/gcc/gcc-4.8.1.ebuild | 8 +-- 3 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 sys-devel/gcc/files/gcc-spec-env-r1.patch (limited to 'sys-devel') diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog index 750c7c17e8ae..5ec3bfcdb672 100644 --- a/sys-devel/gcc/ChangeLog +++ b/sys-devel/gcc/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-devel/gcc # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.959 2013/08/27 04:48:17 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.960 2013/08/31 11:45:41 zorry Exp $ + + 31 Aug 2013; Magnus Granberg gcc-4.8.1.ebuild, + +files/gcc-spec-env-r1.patch: + Bump piepatch and add new version of gcc-spec-env for gcc 4.8.1 27 Aug 2013; Ryan Hill gcc-4.8.1.ebuild: 4.8.1 p1.1: Fixes bug #475350 (add --disable-werror to libatomic and libitm) diff --git a/sys-devel/gcc/files/gcc-spec-env-r1.patch b/sys-devel/gcc/files/gcc-spec-env-r1.patch new file mode 100644 index 000000000000..a58926836e4e --- /dev/null +++ b/sys-devel/gcc/files/gcc-spec-env-r1.patch @@ -0,0 +1,87 @@ +2013-08-22 Magnus Granberg + + * gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var + and move the process of the user specifed specs. + + This allows us to easily control pie/ssp defaults with gcc-config profiles. + Original patch by Rob Holland + Extended to support multiple entries separated by ':' by Kevin F. Quinn + Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill + Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg + +--- gcc-4.8-20130210/gcc/gcc.c 2013-02-05 16:55:31.000000000 +0100 ++++ gcc-4.8-20130210-work/gcc/gcc.c 2013-07-26 02:32:14.625089864 +0200 +@@ -6427,6 +6428,48 @@ main (int argc, char **argv) + do_option_spec (option_default_specs[i].name, + option_default_specs[i].spec); + ++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32)) ++ /* Add specs listed in GCC_SPECS. Note; in the process of separating ++ * each spec listed, the string is overwritten at token boundaries ++ * (':') with '\0', an effect of strtok_r(). ++ */ ++ specs_file = getenv ("GCC_SPECS"); ++ if (specs_file && (strlen(specs_file) > 0)) ++ { ++ char *spec, *saveptr; ++ for (spec=strtok_r(specs_file,":",&saveptr); ++ spec!=NULL; ++ spec=strtok_r(NULL,":",&saveptr)) ++ { ++ struct user_specs *user = (struct user_specs *) ++ xmalloc (sizeof (struct user_specs)); ++ user->next = (struct user_specs *) 0; ++ user->filename = spec; ++ if (user_specs_tail) ++ user_specs_tail->next = user; ++ else ++ user_specs_head = user; ++ user_specs_tail = user; ++ } ++ } ++#endif ++ /* Process any user specified specs in the order given on the command ++ * line. */ ++ for (uptr = user_specs_head; uptr; uptr = uptr->next) ++ { ++ char *filename = find_a_file (&startfile_prefixes, uptr->filename, ++ R_OK, true); ++ read_specs (filename ? filename : uptr->filename, false, true); ++ } ++ /* Process any user self specs. */ ++ { ++ struct spec_list *sl; ++ for (sl = specs; sl; sl = sl->next) ++ if (sl->name_len == sizeof "self_spec" - 1 ++ && !strcmp (sl->name, "self_spec")) ++ do_self_spec (*sl->ptr_spec); ++ } ++ + /* Process DRIVER_SELF_SPECS, adding any new options to the end + of the command line. */ + +@@ -6535,24 +6578,6 @@ main (int argc, char **argv) + PREFIX_PRIORITY_LAST, 0, 1); + } + +- /* Process any user specified specs in the order given on the command +- line. */ +- for (uptr = user_specs_head; uptr; uptr = uptr->next) +- { +- char *filename = find_a_file (&startfile_prefixes, uptr->filename, +- R_OK, true); +- read_specs (filename ? filename : uptr->filename, false, true); +- } +- +- /* Process any user self specs. */ +- { +- struct spec_list *sl; +- for (sl = specs; sl; sl = sl->next) +- if (sl->name_len == sizeof "self_spec" - 1 +- && !strcmp (sl->name, "self_spec")) +- do_self_spec (*sl->ptr_spec); +- } +- + if (compare_debug) + { + enum save_temps save; diff --git a/sys-devel/gcc/gcc-4.8.1.ebuild b/sys-devel/gcc/gcc-4.8.1.ebuild index b382eb3e101d..6b33483621b3 100644 --- a/sys-devel/gcc/gcc-4.8.1.ebuild +++ b/sys-devel/gcc/gcc-4.8.1.ebuild @@ -1,12 +1,12 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-4.8.1.ebuild,v 1.2 2013/08/27 04:48:17 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-4.8.1.ebuild,v 1.3 2013/08/31 11:45:41 zorry Exp $ PATCH_VER="1.1" UCLIBC_VER="1.0" # Hardened gcc 4 stuff -PIE_VER="0.5.6" +PIE_VER="0.5.7" SPECS_VER="0.2.0" SPECS_GCC_VER="4.4.3" # arch/libc configurations known to be stable with {PIE,SSP}-by-default @@ -45,8 +45,8 @@ src_unpack() { toolchain_src_unpack use vanilla && return 0 - - [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch + #Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs. + [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env-r1.patch } pkg_setup() { -- cgit v1.2.3-65-gdbad