From 96f5b13771253b981866176b7539e26d58dd5e75 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 7 Jan 2011 20:35:05 +0000 Subject: Keep -m[arch|tune]=native in COLLECT_GCC_OPTIONS. 2011-01-07 H.J. Lu PR driver/42445 * gcc.c (%>S): New. (SWITCH_KEEP_FOR_GCC): Likewise. (set_collect_gcc_options): Check SWITCH_KEEP_FOR_GCC. (do_spec_1): Handle "%>". * config/i386/i386.h (CC1_CPU_SPEC): Replace "%<" with "%>". From-SVN: r168583 --- gcc/gcc.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index 9ec7d4e..2aebcef 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -390,6 +390,7 @@ or with constant text in a single argument. Note - this command is position dependent. % commands in the spec string before this one will see -S, % commands in the spec string after this one will not. + %>S Similar to "%': { unsigned len = 0; int have_wildcard = 0; int i; + int switch_option; + + if (c == '>') + switch_option = SWITCH_IGNORE | SWITCH_KEEP_FOR_GCC; + else + switch_option = SWITCH_IGNORE; while (p[len] && p[len] != ' ' && p[len] != '\t') len++; @@ -5106,7 +5117,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) if (!strncmp (switches[i].part1, p, len - have_wildcard) && (have_wildcard || switches[i].part1[len] == '\0')) { - switches[i].live_cond |= SWITCH_IGNORE; + switches[i].live_cond |= switch_option; switches[i].validated = 1; } -- cgit v1.1