From 5a8e2650ed8948a7894a79cea8da2ba878d22ae7 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Tue, 26 Sep 2000 17:28:07 +0000 Subject: [PATCH] gcc.c (cpp_options): Add spec for -ftabstop=. * gcc.c (cpp_options): Add spec for -ftabstop=. (invoke_as): New spec that handles invoking as. Update specs to handle -save-temps and -traditional. * ch/lang-specs.h, f/lang-specs.h, java/lang-specs.h: Use invoke_as. * cp/lang-specs.h, objc/lang-specs.h: Update to use invoke_as, and handle -save-temps and -traditional (if appropriate). From-SVN: r36646 --- gcc/ChangeLog | 11 +++++++++++ gcc/ch/lang-specs.h | 3 +-- gcc/cp/lang-specs.h | 17 ++++++++++------- gcc/f/lang-specs.h | 10 ++++------ gcc/gcc.c | 34 +++++++++++++++++++++++----------- gcc/java/lang-specs.h | 4 ++-- gcc/objc/lang-specs.h | 22 +++++++++++++++------- 7 files changed, 66 insertions(+), 35 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a7a28e6c74..02791b9bffd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +Tue 26-Sep-2000 18:25:38 BST Neil Booth + + * gcc.c (cpp_options): Add spec for -ftabstop=. + (invoke_as): New spec that handles invoking as. + Update specs to handle -save-temps and -traditional. + * ch/lang-specs.h, f/lang-specs.h, java/lang-specs.h: + Use invoke_as. + * cp/lang-specs.h, objc/lang-specs.h: Update to use + invoke_as, and handle -save-temps and -traditional (if + appropriate). + 2000-09-26 Jakub Jelinek * config/sparc/sparc.c (sparc_emit_set_const64): Don't abort when diff --git a/gcc/ch/lang-specs.h b/gcc/ch/lang-specs.h index adedbffa871..1ed4bac14cb 100644 --- a/gcc/ch/lang-specs.h +++ b/gcc/ch/lang-specs.h @@ -27,5 +27,4 @@ Boston, MA 02111-1307, USA. */ "tradcpp0 -lang-chill %{!no-gcc:-D__GNUCHILL__=%v1} %(cpp_options)\ %{!M:%{!MM:%{!E:%{!pipe:%g.i} |\n\ cc1chill %{!pipe:%g.i} %(cc1_options)\ - %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}\n"}, + %{!fsyntax-only:%(invoke_as)}}}}\n"}, diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h index a9c47d1c177..141655c58f4 100644 --- a/gcc/cp/lang-specs.h +++ b/gcc/cp/lang-specs.h @@ -30,28 +30,31 @@ Boston, MA 02111-1307, USA. */ {".C", "@c++"}, {"@c++", #if USE_CPPLIB + /* cc1plus has an integrated ISO C preprocessor. We should invoke + the external preprocessor if -save-temps is given. */ "%{E|M|MM:cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\ %{fnew-abi:-D__GXX_ABI_VERSION=100}\ %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)}\ - %{!E:%{!M:%{!MM:cc1plus -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\ + %{!E:%{!M:%{!MM:\ + %{save-temps:cpp0 -lang-c++ %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\ + %(cpp_options) %b.ii \n}\ + cc1plus %{save-temps: -fpreprocessed %b.ii} -lang-c++\ + %{!no-gcc:-D__GNUG__=%v1}\ %{fnew-abi:-D__GXX_ABI_VERSION=100}\ %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\ %(cpp_options) %(cc1_options) %{+e*}\ - %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}" + %{!fsyntax-only:%(invoke_as)}}}}" #else /* ! USE_CPPLIB */ "cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\ %{fnew-abi:-D__GXX_ABI_VERSION=100}\ %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)\ %{!M:%{!MM:%{!E:%{!pipe:%g.ii} |\n\ cc1plus -lang-c++ %{!pipe:%g.ii} %(cc1_options) %{+e*}\ - %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}\n" + %{!fsyntax-only:%(invoke_as)}}}}\n" #endif /* ! USE_CPPLIB */ }, {".ii", "@c++-cpp-output"}, {"@c++-cpp-output", "%{!M:%{!MM:%{!E:\ cc1plus -lang-c++ -fpreprocessed %i %(cc1_options) %{+e*}\ - %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}"}, + %{!fsyntax-only:%(invoke_as)}}}}"}, diff --git a/gcc/f/lang-specs.h b/gcc/f/lang-specs.h index 04fd9de911c..46f54e33b31 100644 --- a/gcc/f/lang-specs.h +++ b/gcc/f/lang-specs.h @@ -29,20 +29,18 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA {".FPP", "@f77-cpp-input"}, {"@f77-cpp-input", "tradcpp0 -lang-fortran %(cpp_options) %{!M:%{!MM:%{!E:%{!pipe:%g.f |\n\ - f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}}\n"}, + f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}}}}"}, {".r", "@ratfor"}, {"@ratfor", "%{C:%{!E:%eGNU C does not support -C without using -E}}\ ratfor %{C} %{v} %i %{E:%W{o*}} %{!E: %{!pipe:-o %g.f} |\n\ - f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}\n"}, + f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}"}, {".f", "@f77"}, {".for", "@f77"}, {".FOR", "@f77"}, {"@f77", - "%{!M:%{!MM:%{!E:f771 %i %(cc1_options) %{I*} %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}\n"}, + "%{!M:%{!MM:%{!E:f771 %i %(cc1_options) %{I*}\ + %{!fsyntax-only:%(invoke_as)}}}}"}, /* XXX This is perverse and should not be necessary. */ {"@f77-version", "tradcpp0 -lang-fortran %(cpp_options) %j \n\ diff --git a/gcc/gcc.c b/gcc/gcc.c index 9884ff767a4..7fe091e0cba 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -583,9 +583,11 @@ static const char *cpp_options = %{!ffreestanding:%{!fno-hosted:-D__STDC_HOSTED__=1}}\ %{fshow-column} %{fno-show-column}\ %{fleading-underscore} %{fno-leading-underscore}\ + %{ftabstop=*}\ %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{U*} %{D*} %{i*} %Z %i\ %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}"; +/* NB: This is shared amongst all front-ends. */ static const char *cc1_options = "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\ @@ -598,6 +600,9 @@ static const char *cc1_options = static const char *asm_options = "%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}"; +static const char *invoke_as = +"%{!S:-o %{|!pipe:%g.s} |\n as %(asm_options) %{!pipe:%g.s} %A }"; + /* Some compilers have limits on line lengths, and the multilib_select and/or multilib_matches strings can be very long, so we build them at run time. */ @@ -709,15 +714,24 @@ static struct compiler default_compilers[] = {".c", "@c"}, {"@c", #if USE_CPPLIB + /* cc1 has an integrated ISO C preprocessor. We should invoke the + external preprocessor if -save-temps or -traditional is given. */ "%{E|M|MM:%(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)}\ - %{!E:%{!M:%{!MM:cc1 -lang-c %{ansi:-std=c89} %(cpp_options)\ - %(cc1_options) %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}" + %{!E:%{!M:%{!MM:\ + %{save-temps:%(trad_capable_cpp) -lang-c %{ansi:-std=c89}\ + %(cpp_options) %b.i \n\ + cc1 -fpreprocessed %b.i %(cc1_options)}\ + %{!save-temps:\ + %{traditional|ftraditional|traditional-cpp:\ + tradcpp0 -lang-c %{ansi:-std=c89} %(cpp_options) %{!pipe:%g.i} |\n\ + cc1 -fpreprocessed %{!pipe:%g.i} %(cc1_options)}\ + %{!traditional:%{!ftraditional:%{!traditional-cpp:\ + cc1 -lang-c %{ansi:-std=c89} %(cpp_options) %(cc1_options)}}}}\ + %{!fsyntax-only:%(invoke_as)}}}}" #else /* ! USE_CPPLIB */ "%(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options) \ %{!M:%{!MM:%{!E:%{!pipe:%g.i} |\n\ - cc1 %{!pipe:%g.i} %(cc1_options) %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}\n" + cc1 %{!pipe:%g.i} %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}" #endif /* ! USE_CPPLIB */ }, {"-", @@ -729,17 +743,14 @@ static struct compiler default_compilers[] = %(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)"}, {".i", "@cpp-output"}, {"@cpp-output", - "%{!M:%{!MM:%{!E:\ - cc1 %i %(cc1_options) %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}"}, + "%{!M:%{!MM:%{!E:cc1 %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}"}, {".s", "@assembler"}, {"@assembler", "%{!M:%{!MM:%{!E:%{!S:as %(asm_options) %i %A }}}}"}, {".S", "@assembler-with-cpp"}, {"@assembler-with-cpp", - "%(trad_capable_cpp) -lang-asm %(cpp_options) \ - %{!M:%{!MM:%{!E:%{!S: %{!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}"}, + "%(trad_capable_cpp) -lang-asm %(cpp_options)\ + %{!M:%{!MM:%{!E:%(invoke_as)}}}"}, #include "specs.h" /* Mark end of table */ {0, 0} @@ -1083,6 +1094,7 @@ static struct spec_list static_specs[] = INIT_STATIC_SPEC ("asm", &asm_spec), INIT_STATIC_SPEC ("asm_final", &asm_final_spec), INIT_STATIC_SPEC ("asm_options", &asm_options), + INIT_STATIC_SPEC ("invoke_as", &invoke_as), INIT_STATIC_SPEC ("cpp", &cpp_spec), INIT_STATIC_SPEC ("cpp_options", &cpp_options), INIT_STATIC_SPEC ("trad_capable_cpp", &trad_capable_cpp), diff --git a/gcc/java/lang-specs.h b/gcc/java/lang-specs.h index 2e571e9df13..ef40189564d 100644 --- a/gcc/java/lang-specs.h +++ b/gcc/java/lang-specs.h @@ -33,5 +33,5 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ "%{fjni:%{femit-class-files:%e-fjni and -femit-class-files are incompatible}}\ %{fjni:%{femit-class-file:%e-fjni and -femit-class-file are incompatible}}\ %{!E:jc1 %i %(jc1) %(cc1_options) %{+e*} %{I*} %{MD} %{MMD} %{M} %{MM}\ - %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}"}, + %{!fsyntax-only:%(invoke_as)}}"}, + diff --git a/gcc/objc/lang-specs.h b/gcc/objc/lang-specs.h index d6d50e0663a..f9e2c141f20 100644 --- a/gcc/objc/lang-specs.h +++ b/gcc/objc/lang-specs.h @@ -24,20 +24,28 @@ Boston, MA 02111-1307, USA. */ {".m", "@objective-c"}, {"@objective-c", #if USE_CPPLIB + /* cc1obj has an integrated ISO C preprocessor. We should invoke the + external preprocessor if -save-temps or -traditional is given. */ "%{E|M|MM:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89} %(cpp_options)}\ - %{!E:%{!M:%{!MM:cc1obj -lang-objc %(cpp_options) %(cc1_options) %{gen-decls}\ - %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}" + %{!E:%{!M:%{!MM:\ + %{save-temps:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89}\ + %(cpp_options) %b.mi \n\ + cc1obj -fpreprocessed %b.mi -lang-objc %(cc1_options) %{gen-decls}}\ + %{!save-temps:\ + %{traditional|ftraditional|traditional-cpp:\ + tradcpp0 -lang-objc %{ansi:-std=c89} %(cpp_options) %{!pipe:%g.mi} |\n\ + cc1obj -fpreprocessed %{!pipe:%g.mi} -lang-objc %(cc1_options) %{gen-decls}}\ + %{!traditional:%{!ftraditional:%{!traditional-cpp:\ + cc1obj -lang-objc %{ansi:-std=c89} %(cpp_options) %(cc1_options) %{gen-decls}}}}}\ + %{!fsyntax-only:%(invoke_as)}}}}" #else /* ! USE_CPPLIB */ "%(trad_capable_cpp) -lang-objc %{ansi:-std=c89} %(cpp_options)\ %{!M:%{!MM:%{!E:%{!pipe:%g.mi} |\n\ cc1obj -lang-objc %{!pipe:%g.mi} %(cc1_options) %{gen-decls}\ - %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}\n" + %{!fsyntax-only:%(invoke_as)}}}}\n" #endif /* ! USE_CPPLIB */ }, {".mi", "@objc-cpp-output"}, {"@objc-cpp-output", "%{!M:%{!MM:%{!E:cc1obj -lang-objc %i %(cc1_options) %{gen-decls}\ - %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ - as %(asm_options) %{!pipe:%g.s} %A }}}}}"}, + %{!fsyntax-only:%(invoke_as)}}}}"}, -- 2.30.2