aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index b265526..9c137fa 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3287,6 +3287,14 @@ process_command (argc, argv)
n_infiles++;
i++;
}
+ else if (strcmp (argv[i], "-l") == 0)
+ {
+ if (i + 1 == argc)
+ fatal ("argument to `-l' is missing");
+
+ n_infiles++;
+ i++;
+ }
else if (strncmp (argv[i], "-l", 2) == 0)
n_infiles++;
else if (strcmp (argv[i], "-save-temps") == 0)
@@ -3728,6 +3736,12 @@ process_command (argc, argv)
infiles[n_infiles].language = "*";
infiles[n_infiles++].name = argv[++i];
}
+ else if (strcmp (argv[i], "-l") == 0)
+ { /* POSIX allows separation of -l and the lib arg;
+ canonicalize by concatenating -l with its arg */
+ infiles[n_infiles].language = "*";
+ infiles[n_infiles++].name = concat ("-l", argv[++i], NULL_PTR);
+ }
else if (strncmp (argv[i], "-l", 2) == 0)
{
infiles[n_infiles].language = "*";