Changeset 3923


Ignore:
Timestamp:
Oct 25, 2014, 7:40:07 PM (11 years ago)
Author:
bird
Message:

trunk: gcc/gcc.c: Backported r101934 and r101993 and applied fix from komh regarding language == NULL by default. Fixes #319.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gcc/gcc/gcc.c

    r1479 r3923  
    28772877static int n_switches;
    28782878
     2879/* Language is one of three things:
     2880
     2881   1) The name of a real programming language.
     2882   2) NULL, indicating that no one has figured out
     2883   what it is yet.
     2884   3) '*', indicating that the file should be passed
     2885   to the linker.  */
    28792886struct infile
    28802887{
     
    63986405    }
    63996406
    6400   /* Reset the output file name to the first input file name, for use
    6401      with %b in LINK_SPEC on a target that prefers not to emit a.out
    6402      by default.  */
     6407  /* Reset the input file name to the first compile/object file name, for use
     6408     with %b in LINK_SPEC. We use the first input file that we can find
     6409     a compiler to compile it instead of using infiles.language since for
     6410     languages other than C we use aliases that we then lookup later.  */
    64036411  if (n_infiles > 0)
    6404     set_input (infiles[0].name);
     6412    {
     6413      int i;
     6414
     6415      for (i = 0; i < n_infiles ; i++)
     6416        if (!infiles[i].language || infiles[i].language[0] != '*')
     6417          {
     6418            set_input (infiles[i].name);
     6419            break;
     6420          }
     6421    }
    64056422
    64066423  if (error_count == 0)
Note: See TracChangeset for help on using the changeset viewer.