Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 232601 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +27 lines)
Line  Link Here
   Add support for external spec file via the GCC_SPECS env var.  This
   Add support for external spec file via the GCC_SPECS env var.  This
1
   allows us to easily control pie/ssp defaults with gcc-config profiles.
1
   allows us to easily control pie/ssp defaults with gcc-config profiles.
2
   Original patch by Rob Holland.  Extended to support multiple
2
   Original patch by Rob Holland.  Extended to support multiple
3
   entries separated by ':' by Kevin F. Quinn
3
   entries separated by ':' by Kevin F. Quinn
4
-- gcc-4/gcc/gcc.c
4
++ gcc-4/gcc/gcc.c
Lines 6482-6487 Link Here
6482
6482
6483
  /* Process any user specified specs in the order given on the command
6483
  /* Process any user specified specs in the order given on the command
6484
     line.  */
6484
     line.  */
6485
#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32))
6486
  /* Add specs listed in GCC_SPECS.  Note; in the process of separating
6487
   * each spec listed, the string is overwritten at token boundaries
6488
   * (':') with '\0', an effect of strtok_r().
6489
   */
6490
  GET_ENVIRONMENT (specs_file, "GCC_SPECS");
6491
  if (specs_file && (strlen(specs_file) > 0))
6492
    {
6493
      char *spec, *saveptr;
6494
      for (spec=strtok_r(specs_file,":",&saveptr);
6495
           spec!=NULL;
6496
           spec=strtok_r(NULL,":",&saveptr))
6497
        {
6498
          struct user_specs *user = (struct user_specs *)
6499
            xmalloc (sizeof (struct user_specs));
6500
6501
          user->next = (struct user_specs *) 0;
6502
          user->filename = spec;
6503
          if (user_specs_tail)
6504
            user_specs_tail->next = user;
6505
          else
6506
            user_specs_head = user;
6507
          user_specs_tail = user;
6508
        }
6509
    }
6510
#endif
6485
  for (uptr = user_specs_head; uptr; uptr = uptr->next)
6511
  for (uptr = user_specs_head; uptr; uptr = uptr->next)
6486
    {
6512
    {
6487
      char *filename = find_a_file (&startfile_prefixes, uptr->filename,
6513
      char *filename = find_a_file (&startfile_prefixes, uptr->filename,

Return to bug 232601