diff options
author | Mark Loeser <halcy0n@gentoo.org> | 2006-03-02 02:49:07 +0000 |
---|---|---|
committer | Mark Loeser <halcy0n@gentoo.org> | 2006-03-02 02:49:07 +0000 |
commit | 32cdd254e54f70bb70fde935086d2647404bada1 (patch) | |
tree | 07704efc387940421bd7b21be19d319a4631ebe0 /4.1.0 | |
parent | Fix trampoline patch's warning() call, and remove old patch that doesn't work... (diff) | |
download | gcc-patches-32cdd254e54f70bb70fde935086d2647404bada1.tar.gz gcc-patches-32cdd254e54f70bb70fde935086d2647404bada1.tar.bz2 gcc-patches-32cdd254e54f70bb70fde935086d2647404bada1.zip |
Update ICE hack from Redhat
Diffstat (limited to '4.1.0')
-rw-r--r-- | 4.1.0/gentoo/01_all_gcc4-ice-hack.patch | 104 |
1 files changed, 51 insertions, 53 deletions
diff --git a/4.1.0/gentoo/01_all_gcc4-ice-hack.patch b/4.1.0/gentoo/01_all_gcc4-ice-hack.patch index 8a043aa..00b5362 100644 --- a/4.1.0/gentoo/01_all_gcc4-ice-hack.patch +++ b/4.1.0/gentoo/01_all_gcc4-ice-hack.patch @@ -1,37 +1,30 @@ 2004-01-23 Jakub Jelinek <jakub@redhat.com> -* system.h (ICE_EXIT_CODE): Define. -* gcc.c (execute): Don't free first string early, but at the end -of the function. Call retry_ice if compiler exited with -ICE_EXIT_CODE. -(retry_ice): New function. -* diagnostic.c (diagnostic_count_diagnostic, -diagnostic_action_after_output, error_recursion): Exit with -ICE_EXIT_CODE instead of FATAL_EXIT_CODE. + * system.h (ICE_EXIT_CODE): Define. + * gcc.c (execute): Don't free first string early, but at the end + of the function. Call retry_ice if compiler exited with + ICE_EXIT_CODE. + (retry_ice): New function. + * diagnostic.c (diagnostic_count_diagnostic, + diagnostic_action_after_output, error_recursion): Exit with + ICE_EXIT_CODE instead of FATAL_EXIT_CODE. - ---- gcc/diagnostic.c 2006-03-01 15:48:45.000000000 -0500 -+++ gcc/diagnostic.c 2006-03-01 16:21:55.000000000 -0500 -@@ -255,14 +255,14 @@ - fnotice (stderr, "Please submit a full bug report,\n" - "with preprocessed source if appropriate.\n" - "See %s for instructions.\n", bug_report_url); -- exit (FATAL_EXIT_CODE); -+ exit (ICE_EXIT_CODE); - - case DK_FATAL: - if (context->abort_on_error) - real_abort (); - - fnotice (stderr, "compilation terminated.\n"); -- exit (FATAL_EXIT_CODE); -+ exit (ICE_EXIT_CODE); +--- gcc/system.h.jj 2004-01-19 17:29:30.000000000 +0100 ++++ gcc/system.h 2004-01-21 11:53:41.000000000 +0100 +@@ -153,6 +153,10 @@ extern int errno; + # endif + #endif - default: - gcc_unreachable (); ---- gcc/gcc.c 2006-03-01 15:48:45.000000000 -0500 -+++ gcc/gcc.c 2006-03-01 16:23:34.000000000 -0500 -@@ -346,6 +346,9 @@ ++#ifndef ICE_EXIT_CODE ++# define ICE_EXIT_CODE 27 ++#endif ++ + #ifdef HAVE_UNISTD_H + # include <unistd.h> + #endif +--- gcc/gcc.c.jj 2004-01-21 11:45:20.000000000 +0100 ++++ gcc/gcc.c 2004-01-21 11:56:46.000000000 +0100 +@@ -346,6 +346,9 @@ static void init_gcc_specs (struct obsta #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX) static const char *convert_filename (const char *, int, int); #endif @@ -41,7 +34,7 @@ ICE_EXIT_CODE instead of FATAL_EXIT_CODE. static const char *if_exists_spec_function (int, const char **); static const char *if_exists_else_spec_function (int, const char **); -@@ -2830,7 +2833,7 @@ +@@ -2841,7 +2844,7 @@ execute (void) } } @@ -50,35 +43,34 @@ ICE_EXIT_CODE instead of FATAL_EXIT_CODE. free ((void *) string); } -@@ -2886,6 +2889,17 @@ +@@ -2897,6 +2900,16 @@ See %s for instructions.", else if (WIFEXITED (status) && WEXITSTATUS (status) >= MIN_FATAL_STATUS) { +#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS)) + /* For ICEs in cc1, cc1obj, cc1plus see if it is -+ * reproducible or not. */ ++ reproducible or not. */ + char *p; + if (WEXITSTATUS (status) == ICE_EXIT_CODE -+ && j == 0 -+ && (p = strrchr (commands[j].argv[0], DIR_SEPARATOR)) ++ && i == 0 ++ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR)) + && ! strncmp (p + 1, "cc1", 3)) -+ retry_ice (commands[j].prog, commands[j].argv); ++ retry_ice (commands[0].prog, commands[0].argv); +#endif -+ if (WEXITSTATUS (status) > greatest_status) greatest_status = WEXITSTATUS (status); ret_code = -1; -@@ -2906,6 +2920,9 @@ +@@ -2917,6 +2930,9 @@ See %s for instructions.", } } + if (commands[0].argv[0] != commands[0].prog) -+ free ((PTR) commands[0].argv[0]) ++ free ((PTR) commands[0].argv[0]); + return ret_code; } } -@@ -5887,6 +5904,224 @@ +@@ -5898,6 +5914,224 @@ give_switch (int switchnum, int omit_fir switches[switchnum].validated = 1; } @@ -129,7 +121,7 @@ ICE_EXIT_CODE instead of FATAL_EXIT_CODE. + + for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt) + { -+ int fd; ++ int fd = -1; + int status; + + temp_filenames[attempt * 2] = make_temp_file (".out"); @@ -303,16 +295,22 @@ ICE_EXIT_CODE instead of FATAL_EXIT_CODE. /* Search for a file named NAME trying various prefixes including the user's -B prefix and some standard ones. Return the absolute file name found. If nothing is found, return NAME. */ ---- gcc/system.h 2006-03-01 15:49:00.000000000 -0500 -+++ gcc/system.h 2006-03-01 16:21:55.000000000 -0500 -@@ -227,6 +227,10 @@ - # endif - #endif +--- gcc/diagnostic.c.jj 2003-10-01 12:09:21.000000000 +0200 ++++ gcc/diagnostic.c 2004-01-21 11:54:47.000000000 +0100 +@@ -237,14 +237,14 @@ diagnostic_action_after_output (diagnost + fnotice (stderr, "Please submit a full bug report,\n" + "with preprocessed source if appropriate.\n" + "See %s for instructions.\n", bug_report_url); +- exit (FATAL_EXIT_CODE); ++ exit (ICE_EXIT_CODE); -+#ifndef ICE_EXIT_CODE -+# define ICE_EXIT_CODE 27 -+#endif -+ - #ifdef HAVE_UNISTD_H - # include <unistd.h> - #endif + case DK_FATAL: + if (context->abort_on_error) + real_abort (); + + fnotice (stderr, "compilation terminated.\n"); +- exit (FATAL_EXIT_CODE); ++ exit (ICE_EXIT_CODE); + + default: + gcc_unreachable (); |