diff options
author | Torbjorn Granlund <tege@gnu.org> | 1994-10-27 22:50:06 +0000 |
---|---|---|
committer | Torbjorn Granlund <tege@gnu.org> | 1994-10-27 22:50:06 +0000 |
commit | 9b226f90938905516f8bb3bd10b1d49ae1493bf3 (patch) | |
tree | 6d3d04ab2d701f8433779c0603f6d7703b194aa1 /gcc | |
parent | 368dfd3a5b2916890f3208ebe358f550fac7e4c3 (diff) | |
download | gcc-9b226f90938905516f8bb3bd10b1d49ae1493bf3.zip gcc-9b226f90938905516f8bb3bd10b1d49ae1493bf3.tar.gz gcc-9b226f90938905516f8bb3bd10b1d49ae1493bf3.tar.bz2 |
(process_command): Don't forget to split -Wl arguments at commas.
From-SVN: r8350
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gcc.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -2583,7 +2583,12 @@ process_command (argc, argv) /* The +e options to the C++ front-end. */ n_switches++; else if (strncmp (argv[i], "-Wl,", 4) == 0) - n_infiles++; + { + int j; + /* Split the argument at commas. */ + for (j = 3; argv[i][j]; j++) + n_infiles += (argv[i][j] == ','); + } else if (strcmp (argv[i], "-Xlinker") == 0) { if (i + 1 == argc) @@ -2794,8 +2799,20 @@ process_command (argc, argv) } else if (strncmp (argv[i], "-Wl,", 4) == 0) { + int prev, j; + /* Split the argument at commas. */ + prev = 4; + for (j = 4; argv[i][j]; j++) + if (argv[i][j] == ',') + { + infiles[n_infiles].language = spec_lang; + infiles[n_infiles++].name + = save_string (argv[i] + prev, j - prev); + prev = j + 1; + } + /* Record the part after the last comma. */ infiles[n_infiles].language = spec_lang; - infiles[n_infiles++].name = argv[i] + 4; + infiles[n_infiles++].name = argv[i] + prev; } else if (strcmp (argv[i], "-Xlinker") == 0) { |