libptail->next = a;
libptail = a;
}
-
struct arglist *libhead, *libtail;
static void add_library(const char *p)
includetail = a;
}
+struct arglist *extrahead, *extratail;
+
+static void add_extra(const char *p)
+{
+ struct arglist *a = arg_make(p);
+ if (extrahead == NULL)
+ extrahead = a;
+ else
+ extratail->next = a;
+ extratail = a;
+}
+
static char *target;
static void set_target(const char *p)
add_argument("-Ddouble=float");
/* User provided macros */
add_argument_list(machead);
+ /* -Wc, options */
+ add_argument_list(extrahead);
/* Paths */
add_option_list("-I", includehead);
if (mode == MODE_LINK)
case 'g':
debug = 1;
break;
+ case 'W': /* -Wc,-foo to pass on -foo directly */
+ if (p[2] == 'c' && p[3] == ',') {
+ add_extra(p + 4);
+ break;
+ }
+ /* Fall through */
default:
if (strcmp(p, "-Werror") == 0)
werror = 1;