Commit 5a8e2650 by Neil Booth Committed by Neil Booth

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
parent 380f6ad3
Tue 26-Sep-2000 18:25:38 BST Neil Booth <neilb@earthling.net>
* 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 <jakub@redhat.com> 2000-09-26 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.c (sparc_emit_set_const64): Don't abort when * config/sparc/sparc.c (sparc_emit_set_const64): Don't abort when
......
...@@ -27,5 +27,4 @@ Boston, MA 02111-1307, USA. */ ...@@ -27,5 +27,4 @@ Boston, MA 02111-1307, USA. */
"tradcpp0 -lang-chill %{!no-gcc:-D__GNUCHILL__=%v1} %(cpp_options)\ "tradcpp0 -lang-chill %{!no-gcc:-D__GNUCHILL__=%v1} %(cpp_options)\
%{!M:%{!MM:%{!E:%{!pipe:%g.i} |\n\ %{!M:%{!MM:%{!E:%{!pipe:%g.i} |\n\
cc1chill %{!pipe:%g.i} %(cc1_options)\ cc1chill %{!pipe:%g.i} %(cc1_options)\
%{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ %{!fsyntax-only:%(invoke_as)}}}}\n"},
as %(asm_options) %{!pipe:%g.s} %A }}}}}\n"},
...@@ -30,28 +30,31 @@ Boston, MA 02111-1307, USA. */ ...@@ -30,28 +30,31 @@ Boston, MA 02111-1307, USA. */
{".C", "@c++"}, {".C", "@c++"},
{"@c++", {"@c++",
#if USE_CPPLIB #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}\ "%{E|M|MM:cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
%{fnew-abi:-D__GXX_ABI_VERSION=100}\ %{fnew-abi:-D__GXX_ABI_VERSION=100}\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)}\ %{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}\ %{fnew-abi:-D__GXX_ABI_VERSION=100}\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\ %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%(cpp_options) %(cc1_options) %{+e*}\ %(cpp_options) %(cc1_options) %{+e*}\
%{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ %{!fsyntax-only:%(invoke_as)}}}}"
as %(asm_options) %{!pipe:%g.s} %A }}}}}"
#else /* ! USE_CPPLIB */ #else /* ! USE_CPPLIB */
"cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\ "cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
%{fnew-abi:-D__GXX_ABI_VERSION=100}\ %{fnew-abi:-D__GXX_ABI_VERSION=100}\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)\ %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)\
%{!M:%{!MM:%{!E:%{!pipe:%g.ii} |\n\ %{!M:%{!MM:%{!E:%{!pipe:%g.ii} |\n\
cc1plus -lang-c++ %{!pipe:%g.ii} %(cc1_options) %{+e*}\ cc1plus -lang-c++ %{!pipe:%g.ii} %(cc1_options) %{+e*}\
%{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ %{!fsyntax-only:%(invoke_as)}}}}\n"
as %(asm_options) %{!pipe:%g.s} %A }}}}}\n"
#endif /* ! USE_CPPLIB */ #endif /* ! USE_CPPLIB */
}, },
{".ii", "@c++-cpp-output"}, {".ii", "@c++-cpp-output"},
{"@c++-cpp-output", {"@c++-cpp-output",
"%{!M:%{!MM:%{!E:\ "%{!M:%{!MM:%{!E:\
cc1plus -lang-c++ -fpreprocessed %i %(cc1_options) %{+e*}\ cc1plus -lang-c++ -fpreprocessed %i %(cc1_options) %{+e*}\
%{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ %{!fsyntax-only:%(invoke_as)}}}}"},
as %(asm_options) %{!pipe:%g.s} %A }}}}}"},
...@@ -29,20 +29,18 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -29,20 +29,18 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
{".FPP", "@f77-cpp-input"}, {".FPP", "@f77-cpp-input"},
{"@f77-cpp-input", {"@f77-cpp-input",
"tradcpp0 -lang-fortran %(cpp_options) %{!M:%{!MM:%{!E:%{!pipe:%g.f |\n\ "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\ f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}}}}"},
as %(asm_options) %{!pipe:%g.s} %A }}}}}}\n"},
{".r", "@ratfor"}, {".r", "@ratfor"},
{"@ratfor", {"@ratfor",
"%{C:%{!E:%eGNU C does not support -C without using -E}}\ "%{C:%{!E:%eGNU C does not support -C without using -E}}\
ratfor %{C} %{v} %i %{E:%W{o*}} %{!E: %{!pipe:-o %g.f} |\n\ 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\ f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}"},
as %(asm_options) %{!pipe:%g.s} %A }}}\n"},
{".f", "@f77"}, {".f", "@f77"},
{".for", "@f77"}, {".for", "@f77"},
{".FOR", "@f77"}, {".FOR", "@f77"},
{"@f77", {"@f77",
"%{!M:%{!MM:%{!E:f771 %i %(cc1_options) %{I*} %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ "%{!M:%{!MM:%{!E:f771 %i %(cc1_options) %{I*}\
as %(asm_options) %{!pipe:%g.s} %A }}}}}\n"}, %{!fsyntax-only:%(invoke_as)}}}}"},
/* XXX This is perverse and should not be necessary. */ /* XXX This is perverse and should not be necessary. */
{"@f77-version", {"@f77-version",
"tradcpp0 -lang-fortran %(cpp_options) %j \n\ "tradcpp0 -lang-fortran %(cpp_options) %j \n\
......
...@@ -583,9 +583,11 @@ static const char *cpp_options = ...@@ -583,9 +583,11 @@ static const char *cpp_options =
%{!ffreestanding:%{!fno-hosted:-D__STDC_HOSTED__=1}}\ %{!ffreestanding:%{!fno-hosted:-D__STDC_HOSTED__=1}}\
%{fshow-column} %{fno-show-column}\ %{fshow-column} %{fno-show-column}\
%{fleading-underscore} %{fno-leading-underscore}\ %{fleading-underscore} %{fno-leading-underscore}\
%{ftabstop=*}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{U*} %{D*} %{i*} %Z %i\ %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{U*} %{D*} %{i*} %Z %i\
%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}"; %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}";
/* NB: This is shared amongst all front-ends. */
static const char *cc1_options = static const char *cc1_options =
"%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\ %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\
...@@ -598,6 +600,9 @@ static const char *cc1_options = ...@@ -598,6 +600,9 @@ static const char *cc1_options =
static const char *asm_options = static const char *asm_options =
"%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}"; "%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 /* 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 and/or multilib_matches strings can be very long, so we build them at
run time. */ run time. */
...@@ -709,15 +714,24 @@ static struct compiler default_compilers[] = ...@@ -709,15 +714,24 @@ static struct compiler default_compilers[] =
{".c", "@c"}, {".c", "@c"},
{"@c", {"@c",
#if USE_CPPLIB #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:%(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)}\
%{!E:%{!M:%{!MM:cc1 -lang-c %{ansi:-std=c89} %(cpp_options)\ %{!E:%{!M:%{!MM:\
%(cc1_options) %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ %{save-temps:%(trad_capable_cpp) -lang-c %{ansi:-std=c89}\
as %(asm_options) %{!pipe:%g.s} %A }}}}}" %(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 */ #else /* ! USE_CPPLIB */
"%(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options) \ "%(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options) \
%{!M:%{!MM:%{!E:%{!pipe:%g.i} |\n\ %{!M:%{!MM:%{!E:%{!pipe:%g.i} |\n\
cc1 %{!pipe:%g.i} %(cc1_options) %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ cc1 %{!pipe:%g.i} %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}"
as %(asm_options) %{!pipe:%g.s} %A }}}}}\n"
#endif /* ! USE_CPPLIB */ #endif /* ! USE_CPPLIB */
}, },
{"-", {"-",
...@@ -729,17 +743,14 @@ static struct compiler default_compilers[] = ...@@ -729,17 +743,14 @@ static struct compiler default_compilers[] =
%(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)"}, %(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)"},
{".i", "@cpp-output"}, {".i", "@cpp-output"},
{"@cpp-output", {"@cpp-output",
"%{!M:%{!MM:%{!E:\ "%{!M:%{!MM:%{!E:cc1 %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}"},
cc1 %i %(cc1_options) %{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\
as %(asm_options) %{!pipe:%g.s} %A }}}}}"},
{".s", "@assembler"}, {".s", "@assembler"},
{"@assembler", {"@assembler",
"%{!M:%{!MM:%{!E:%{!S:as %(asm_options) %i %A }}}}"}, "%{!M:%{!MM:%{!E:%{!S:as %(asm_options) %i %A }}}}"},
{".S", "@assembler-with-cpp"}, {".S", "@assembler-with-cpp"},
{"@assembler-with-cpp", {"@assembler-with-cpp",
"%(trad_capable_cpp) -lang-asm %(cpp_options) \ "%(trad_capable_cpp) -lang-asm %(cpp_options)\
%{!M:%{!MM:%{!E:%{!S: %{!pipe:%g.s} |\n\ %{!M:%{!MM:%{!E:%(invoke_as)}}}"},
as %(asm_options) %{!pipe:%g.s} %A }}}}"},
#include "specs.h" #include "specs.h"
/* Mark end of table */ /* Mark end of table */
{0, 0} {0, 0}
...@@ -1083,6 +1094,7 @@ static struct spec_list static_specs[] = ...@@ -1083,6 +1094,7 @@ static struct spec_list static_specs[] =
INIT_STATIC_SPEC ("asm", &asm_spec), INIT_STATIC_SPEC ("asm", &asm_spec),
INIT_STATIC_SPEC ("asm_final", &asm_final_spec), INIT_STATIC_SPEC ("asm_final", &asm_final_spec),
INIT_STATIC_SPEC ("asm_options", &asm_options), INIT_STATIC_SPEC ("asm_options", &asm_options),
INIT_STATIC_SPEC ("invoke_as", &invoke_as),
INIT_STATIC_SPEC ("cpp", &cpp_spec), INIT_STATIC_SPEC ("cpp", &cpp_spec),
INIT_STATIC_SPEC ("cpp_options", &cpp_options), INIT_STATIC_SPEC ("cpp_options", &cpp_options),
INIT_STATIC_SPEC ("trad_capable_cpp", &trad_capable_cpp), INIT_STATIC_SPEC ("trad_capable_cpp", &trad_capable_cpp),
......
...@@ -33,5 +33,5 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -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-files:%e-fjni and -femit-class-files are incompatible}}\
%{fjni:%{femit-class-file:%e-fjni and -femit-class-file 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}\ %{!E:jc1 %i %(jc1) %(cc1_options) %{+e*} %{I*} %{MD} %{MMD} %{M} %{MM}\
%{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ %{!fsyntax-only:%(invoke_as)}}"},
as %(asm_options) %{!pipe:%g.s} %A }}}"},
...@@ -24,20 +24,28 @@ Boston, MA 02111-1307, USA. */ ...@@ -24,20 +24,28 @@ Boston, MA 02111-1307, USA. */
{".m", "@objective-c"}, {".m", "@objective-c"},
{"@objective-c", {"@objective-c",
#if USE_CPPLIB #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:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89} %(cpp_options)}\
%{!E:%{!M:%{!MM:cc1obj -lang-objc %(cpp_options) %(cc1_options) %{gen-decls}\ %{!E:%{!M:%{!MM:\
%{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ %{save-temps:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89}\
as %(asm_options) %{!pipe:%g.s} %A }}}}}" %(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 */ #else /* ! USE_CPPLIB */
"%(trad_capable_cpp) -lang-objc %{ansi:-std=c89} %(cpp_options)\ "%(trad_capable_cpp) -lang-objc %{ansi:-std=c89} %(cpp_options)\
%{!M:%{!MM:%{!E:%{!pipe:%g.mi} |\n\ %{!M:%{!MM:%{!E:%{!pipe:%g.mi} |\n\
cc1obj -lang-objc %{!pipe:%g.mi} %(cc1_options) %{gen-decls}\ cc1obj -lang-objc %{!pipe:%g.mi} %(cc1_options) %{gen-decls}\
%{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ %{!fsyntax-only:%(invoke_as)}}}}\n"
as %(asm_options) %{!pipe:%g.s} %A }}}}}\n"
#endif /* ! USE_CPPLIB */ #endif /* ! USE_CPPLIB */
}, },
{".mi", "@objc-cpp-output"}, {".mi", "@objc-cpp-output"},
{"@objc-cpp-output", {"@objc-cpp-output",
"%{!M:%{!MM:%{!E:cc1obj -lang-objc %i %(cc1_options) %{gen-decls}\ "%{!M:%{!MM:%{!E:cc1obj -lang-objc %i %(cc1_options) %{gen-decls}\
%{!fsyntax-only:%{!S:-o %{|!pipe:%g.s} |\n\ %{!fsyntax-only:%(invoke_as)}}}}"},
as %(asm_options) %{!pipe:%g.s} %A }}}}}"},
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment