Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2010-10-30 Alexander Williams <[email protected]>
- Index: gcc/gcc.c
- ===================================================================
- --- gcc/gcc.c
- +++ gcc/gcc.c (working copy)
- @@ -1753,7 +1753,8 @@
- {
- char *buf;
- - buf = concat ("%{static|static-libgcc:", static_name, " ", eh_name, "}"
- + buf = concat ("%{pg:", static_name, " ", eh_name, "} %{!pg:",
- + "%{static|static-libgcc|pg:", static_name, " ", eh_name, "}"
- "%{!static:%{!static-libgcc:"
- #if USE_LD_AS_NEEDED
- "%{!shared-libgcc:",
- @@ -1776,7 +1777,7 @@
- "%{shared:", shared_name, "}"
- #endif
- #endif
- - "}}", NULL);
- + "}}}", NULL);
- obstack_grow (obstack, buf, strlen (buf));
- free (buf);
- @@ -3601,6 +3602,44 @@
- exit (status);
- }
- + /* Options specified as if they appeared on the command line. */
- + temp = getenv ("GCC_OPTIONS");
- + if ((temp) && (strlen (temp) > 0))
- + {
- + int len;
- + int optc = 1;
- + int new_argc;
- + const char **new_argv;
- + char *envopts;
- +
- + while (ISSPACE (*temp))
- + temp++;
- + len = strlen (temp);
- + envopts = (char *) xmalloc (len + 1);
- + strcpy (envopts, temp);
- +
- + for (i = 0; i < (len - 1); i++)
- + if ((ISSPACE (envopts[i])) && ! (ISSPACE (envopts[i+1])))
- + optc++;
- +
- + new_argv = (const char **) alloca ((optc + argc) * sizeof(char *));
- +
- + for (i = 0, new_argc = 1; new_argc <= optc; new_argc++)
- + {
- + while (ISSPACE (envopts[i]))
- + i++;
- + new_argv[new_argc] = envopts + i;
- + while (!ISSPACE (envopts[i]) && (envopts[i] != '\0'))
- + i++;
- + envopts[i++] = '\0';
- + }
- + for (i = 1; i < argc; i++)
- + new_argv[new_argc++] = argv[i];
- +
- + argv = new_argv;
- + argc = new_argc;
- + }
- +
- /* Convert new-style -- options to old-style. */
- translate_options (&argc,
- CONST_CAST2 (const char *const **, const char ***,
- @@ -7087,6 +7126,7 @@
- /* Sysrooted prefixes are relocated because target_system_root is
- also relocated by gcc_exec_prefix. */
- +
- if (*standard_startfile_prefix_1)
- add_sysrooted_prefix (&startfile_prefixes,
- standard_startfile_prefix_1, "BINUTILS",
- @@ -7304,7 +7344,7 @@
- }
- if (n_infiles == added_libraries)
- - fatal ("no input files");
- + fatal ("No input files specified");
- /* Make a place to record the compiler output file names
- that correspond to the input files. */
Advertisement
Add Comment
Please, Sign In to add comment