summaryrefslogtreecommitdiff
path: root/sys-devel/gcc/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/gcc/files')
-rw-r--r--sys-devel/gcc/files/gcc-4.6.4-fix-ICE-on-arm.patch24
-rw-r--r--sys-devel/gcc/files/gcc-4.6.4-spec-env.patch43
-rw-r--r--sys-devel/gcc/files/gcc-spec-env-r1.patch87
-rw-r--r--sys-devel/gcc/files/gcc-spec-env.patch5
4 files changed, 157 insertions, 2 deletions
diff --git a/sys-devel/gcc/files/gcc-4.6.4-fix-ICE-on-arm.patch b/sys-devel/gcc/files/gcc-4.6.4-fix-ICE-on-arm.patch
new file mode 100644
index 00000000..578506a9
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-4.6.4-fix-ICE-on-arm.patch
@@ -0,0 +1,24 @@
+--- gcc-4.6.4/gcc/config/arm/arm.md
++++ gcc-4.6.4/gcc/config/arm/arm.md
+@@ -4202,7 +4202,9 @@
+ #
+ ldr%(h%)\\t%0, %1"
+ [(set_attr "type" "alu_shift,load_byte")
+- (set_attr "predicable" "yes")]
++ (set_attr "predicable" "yes")
++ (set_attr "pool_range" "*,256")
++ (set_attr "neg_pool_range" "*,244")]
+ )
+
+ (define_insn "*arm_zero_extendhisi2_v6"
+@@ -4213,7 +4215,9 @@
+ uxth%?\\t%0, %1
+ ldr%(h%)\\t%0, %1"
+ [(set_attr "type" "alu_shift,load_byte")
+- (set_attr "predicable" "yes")]
++ (set_attr "predicable" "yes")
++ (set_attr "pool_range" "*,256")
++ (set_attr "neg_pool_range" "*,244")]
+ )
+
+ (define_insn "*arm_zero_extendhisi2addsi"
diff --git a/sys-devel/gcc/files/gcc-4.6.4-spec-env.patch b/sys-devel/gcc/files/gcc-4.6.4-spec-env.patch
new file mode 100644
index 00000000..fff1221e
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-4.6.4-spec-env.patch
@@ -0,0 +1,43 @@
+ Add support for external spec file via the GCC_SPECS env var. This
+ allows us to easily control pie/ssp defaults with gcc-config profiles.
+
+ Original patch by Rob Holland
+ Modified for Gentoo-based distros 'cuz of archive name by Stefan Cristian B.
+ Extended to support multiple entries separated by ':' by Kevin F. Quinn
+ Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
+
+--- gcc-4.6.4/gcc/gcc.c
++++ gcc-4.6.4/gcc/gcc.c
+@@ -6482,6 +6482,32 @@
+
+ /* Process any user specified specs in the order given on the command
+ line. */
++#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
+ for (uptr = user_specs_head; uptr; uptr = uptr->next)
+ {
+ char *filename = find_a_file (&startfile_prefixes, uptr->filename,
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 00000000..a5892683
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-spec-env-r1.patch
@@ -0,0 +1,87 @@
+2013-08-22 Magnus Granberg <zorry@gentoo.org>
+
+ * 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/files/gcc-spec-env.patch b/sys-devel/gcc/files/gcc-spec-env.patch
index 57e7567e..5fa61a91 100644
--- a/sys-devel/gcc/files/gcc-spec-env.patch
+++ b/sys-devel/gcc/files/gcc-spec-env.patch
@@ -2,11 +2,12 @@
allows us to easily control pie/ssp defaults with gcc-config profiles.
Original patch by Rob Holland
+ Modified for Gentoo-based distros 'cuz of archive name by Stefan Cristian B.
Extended to support multiple entries separated by ':' by Kevin F. Quinn
Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
---- gcc-4/gcc/gcc.c
-+++ gcc-4/gcc/gcc.c
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
@@ -6482,6 +6482,32 @@
/* Process any user specified specs in the order given on the command