Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 528170
Collapse All | Expand All

(-)gcc-4.8-20130210/gcc/gcc.c (-18 / +42 lines)
Lines 7004-7009 main (int argc, char **argv) Link Here
7004
    do_option_spec (option_default_specs[i].name,
7005
    do_option_spec (option_default_specs[i].name,
7005
		    option_default_specs[i].spec);
7006
		    option_default_specs[i].spec);
7006
7007
7008
#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32))
7009
  /* Add specs listed in GCC_SPECS.  Note; in the process of separating
7010
   * each spec listed, the string is overwritten at token boundaries
7011
   * (':') with '\0', an effect of strtok_r().
7012
   */
7013
  specs_file = getenv ("GCC_SPECS");
7014
  if (specs_file && (strlen(specs_file) > 0))
7015
    {
7016
      char *spec, *saveptr;
7017
      for (spec=strtok_r(specs_file,":",&saveptr);
7018
           spec!=NULL;
7019
           spec=strtok_r(NULL,":",&saveptr))
7020
        {
7021
          struct user_specs *user = (struct user_specs *)
7022
            xmalloc (sizeof (struct user_specs));
7023
          user->next = (struct user_specs *) 0;
7024
          user->filename = spec;
7025
          if (user_specs_tail)
7026
            user_specs_tail->next = user;
7027
          else
7028
            user_specs_head = user;
7029
          user_specs_tail = user;
7030
        }
7031
    }
7032
#endif
7033
  /* Process any user specified specs in the order given on the command
7034
   *     line.  */
7035
  for (struct user_specs *uptr = user_specs_head; uptr; uptr = uptr->next)
7036
    {
7037
      char *filename = find_a_file (&startfile_prefixes, uptr->filename,
7038
        R_OK, true);
7039
      read_specs (filename ? filename : uptr->filename, false, true);
7040
    }
7041
  /* Process any user self specs.  */
7042
  {
7043
    struct spec_list *sl;
7044
    for (sl = specs; sl; sl = sl->next)
7045
      if (sl->name_len == sizeof "self_spec" - 1
7046
          && !strcmp (sl->name, "self_spec"))
7047
        do_self_spec (*sl->ptr_spec);
7048
  }
7049
7007
  /* Process DRIVER_SELF_SPECS, adding any new options to the end
7050
  /* Process DRIVER_SELF_SPECS, adding any new options to the end
7008
     of the command line.  */
7051
     of the command line.  */
7009
7052
Lines 7112-7135 main (int argc, char **argv) Link Here
7112
			      PREFIX_PRIORITY_LAST, 0, 1);
7155
			      PREFIX_PRIORITY_LAST, 0, 1);
7113
    }
7156
    }
7114
7157
7115
  /* Process any user specified specs in the order given on the command
7116
     line.  */
7117
  for (struct user_specs *uptr = user_specs_head; uptr; uptr = uptr->next)
7118
    {
7119
      char *filename = find_a_file (&startfile_prefixes, uptr->filename,
7120
				    R_OK, true);
7121
      read_specs (filename ? filename : uptr->filename, false, true);
7122
    }
7123
7124
  /* Process any user self specs.  */
7125
  {
7126
    struct spec_list *sl;
7127
    for (sl = specs; sl; sl = sl->next)
7128
      if (sl->name_len == sizeof "self_spec" - 1
7129
	  && !strcmp (sl->name, "self_spec"))
7130
	do_self_spec (*sl->ptr_spec);
7131
  }
7132
7133
  if (compare_debug)
7158
  if (compare_debug)
7134
    {
7159
    {
7135
      enum save_temps save;
7160
      enum save_temps save;

Return to bug 528170