diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-07-13 22:38:51 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-07-13 22:38:51 +0000 |
commit | 2b36f3ad7dac7648d17e79b2467fa80f11b5859a (patch) | |
tree | 5bf47887fc7b63496f3d8cf8e0ba4617d488c9f1 /gcc/gcc.c | |
parent | 8ae4b10a910255304d9d409da28edf0ae288c8de (diff) | |
download | gcc-2b36f3ad7dac7648d17e79b2467fa80f11b5859a.tar.gz |
* i386/i386.h (CPP_486_SPEC, CPP_586_SPEC, CPP_686_SPEC): New specs.
(CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Use them.
(EXTRA_SPECS): Support them.
* gcc.c: Delete %[spec] support.
(do_spec_1, case '('): Likewise.
(do_spec_1, case '['): Call error.
* i386/aix386ng.h, cygwin32.h, freebsd-elf.h, gas.h, isc.h,
linux-aout.h, linux-oldld.h, linux.h, osfelf.h, osfrose.h, sco.h,
sco4.h, sco4dbx.h, sco5.h, sol2.h, sysv3.h (CPP_SPEC): Delete
%[cpp_cpu].
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21120 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 72 |
1 files changed, 16 insertions, 56 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index 48b94fc14fd..17978f72644 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -365,7 +365,6 @@ or with constant text in a single argument. %{S|P:X} substitutes X if either -S or -P was given to CC. This may be combined with ! and . as above binding stronger than the OR. %(Spec) processes a specification defined in a specs file as *Spec: - %[Spec] as above, but put __ around -D arguments The conditional text X in a %{S:X} or %{!S:X} construct may contain other nested % constructs or spaces, or even newlines. They are @@ -1111,8 +1110,7 @@ skip_whitespace (p) } /* Structure to keep track of the specs that have been defined so far. - These are accessed using %(specname) or %[specname] in a compiler - or link spec. */ + These are accessed using %(specname) in a compiler or link spec. */ struct spec_list { @@ -3994,11 +3992,8 @@ do_spec_1 (spec, inswitch, soft_matched_part) /* Process a string found as the value of a spec given by name. This feature allows individual machine descriptions - to add and use their own specs. - %[...] modifies -D options the way %P does; - %(...) uses the spec unmodified. */ + to add and use their own specs. */ case '(': - case '[': { char *name = p; struct spec_list *sl; @@ -4006,7 +4001,7 @@ do_spec_1 (spec, inswitch, soft_matched_part) /* The string after the S/P is the name of a spec that is to be processed. */ - while (*p && *p != ')' && *p != ']') + while (*p && *p != ')') p++; /* See if it's in the list */ @@ -4015,67 +4010,32 @@ do_spec_1 (spec, inswitch, soft_matched_part) { name = *(sl->ptr_spec); #ifdef DEBUG_SPECS - fprintf (stderr, "Processing spec %c%s%c, which is '%s'\n", - c, sl->name, (c == '(') ? ')' : ']', name); + fprintf (stderr, "Processing spec %s, which is '%s'\n", + sl->name, name); #endif break; } if (sl) { - if (c == '(') - { - value = do_spec_1 (name, 0, NULL_PTR); - if (value != 0) - return value; - } - else - { - char *x = (char *) alloca (strlen (name) * 2 + 1); - char *buf = x; - char *y = name; - int flag = 0; - - /* Copy all of NAME into BUF, but put __ after - every -D and at the end of each arg, */ - while (1) - { - if (! strncmp (y, "-D", 2)) - { - *x++ = '-'; - *x++ = 'D'; - *x++ = '_'; - *x++ = '_'; - y += 2; - flag = 1; - continue; - } - else if (flag && (*y == ' ' || *y == '\t' || *y == '=' - || *y == '}' || *y == 0)) - { - *x++ = '_'; - *x++ = '_'; - flag = 0; - } - if (*y == 0) - break; - else - *x++ = *y++; - } - *x = 0; - - value = do_spec_1 (buf, 0, NULL_PTR); - if (value != 0) - return value; - } + value = do_spec_1 (name, 0, NULL_PTR); + if (value != 0) + return value; } - /* Discard the closing paren or bracket. */ + /* Discard the closing paren. */ if (*p) p++; } break; + /* This used to be like %(, except that it modified -D options + the same way as %P. This has been obsoleted, as it was not + useful for obtaining correct ISO C semantics for defines. */ + case '[': + error ("use of obsolete %[ operator in specs"); + return -1; + case 'v': { int c1 = *p++; /* Select first or second version number. */ |