aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-02-11 16:08:02 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1995-02-11 16:08:02 -0500
commited7dae049fef46ec7cd9d71fb49e72f8a560ad99 (patch)
tree077e20255d9cef95629177190cfa5021737a8935
parentc40f7b333a8201eaf4af5c77297f9a1e39371325 (diff)
downloadgcc-ed7dae049fef46ec7cd9d71fb49e72f8a560ad99.zip
gcc-ed7dae049fef46ec7cd9d71fb49e72f8a560ad99.tar.gz
gcc-ed7dae049fef46ec7cd9d71fb49e72f8a560ad99.tar.bz2
(specs): Use %O instead of "o" for object file suffix.
(do_spec_1, case 'O'): New option. From-SVN: r8908
-rw-r--r--gcc/gcc.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index d894e3b..610b074 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -144,6 +144,11 @@ compilation is specified by a string called a "spec". */
#define EXECUTABLE_SUFFIX ""
#endif
+/* By default, the suffix for object files is the letter "o". */
+#ifndef OBJECT_SUFFIX
+#define OBJECT_SUFFIX "o"
+#endif
+
/* By default, colon separates directories in a path. */
#ifndef PATH_SEPARATOR
#define PATH_SEPARATOR ':'
@@ -334,6 +339,7 @@ or with constant text in a single argument.
Input files whose names have no recognized suffix are not compiled
at all, but they are included among the output files, so they will
be linked.
+ %O substitutes the suffix for object files.
%p substitutes the standard macro predefinitions for the
current target machine. Use this when running cpp.
%P like %p, but puts `__' before and after the name of each macro.
@@ -476,7 +482,7 @@ proper position among the other output files. */
/* config.h can define STARTFILE_SPEC to override the default crt0 files. */
#ifndef STARTFILE_SPEC
#define STARTFILE_SPEC \
- "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}"
+ "%{!shared:%{pg:gcrt0.%O%s}%{!pg:%{p:mcrt0.%O%s}%{!p:crt0.%O%s}}}"
#endif
/* config.h can define SWITCHES_NEED_SPACES to control passing -o and -L.
@@ -597,7 +603,7 @@ static struct compiler default_compilers[] =
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
+ %{c:%W{o*}%{!o*:-o %w%b.%O}}%{!c:-o %d%w%u.%O}\
%{!pipe:%g.s} %A\n }}}}"},
{"-",
"%{E:cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
@@ -632,7 +638,7 @@ static struct compiler default_compilers[] =
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
+ %{c:%W{o*}%{!o*:-o %w%b.%O}}%{!c:-o %d%w%u.%O}\
%{!pipe:%g.s} %A\n }}}}"},
{".h", "@c-header"},
{"@c-header",
@@ -690,7 +696,7 @@ static struct compiler default_compilers[] =
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
+ %{c:%W{o*}%{!o*:-o %w%b.%O}}%{!c:-o %d%w%u.%O}\
%{!pipe:%g.s} %A\n }}}}"},
{".i", "@cpp-output"},
{"@cpp-output",
@@ -701,7 +707,7 @@ static struct compiler default_compilers[] =
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
+ %{c:%W{o*}%{!o*:-o %w%b.%O}}%{!c:-o %d%w%u.%O}\
%{!pipe:%g.s} %A\n }}}}"},
{".ii", "@c++-cpp-output"},
{"@c++-cpp-output",
@@ -712,12 +718,12 @@ static struct compiler default_compilers[] =
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
+ %{c:%W{o*}%{!o*:-o %w%b.%O}}%{!c:-o %d%w%u.%O}\
%{!pipe:%g.s} %A\n }}}}"},
{".s", "@assembler"},
{"@assembler",
"%{!M:%{!MM:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
+ %{c:%W{o*}%{!o*:-o %w%b.%O}}%{!c:-o %d%w%u.%O}\
%i %A\n }}}}"},
{".S", "@assembler-with-cpp"},
{"@assembler-with-cpp",
@@ -730,7 +736,7 @@ static struct compiler default_compilers[] =
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
%i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
"%{!M:%{!MM:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
+ %{c:%W{o*}%{!o*:-o %w%b.%O}}%{!c:-o %d%w%u.%O}\
%{!pipe:%g.s} %A\n }}}}"},
{".ads", "@ada"},
{".adb", "@ada"},
@@ -742,8 +748,8 @@ static struct compiler default_compilers[] =
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%i %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:%{!gnatc:%{!gnats:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}\
- %{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n}}}}}} "},
+ %{c:%W{o*}%{!o*:-o %w%b.%O}}\
+ %{!c:-o %d%w%u.%O} %{!pipe:%g.s} %A\n}}}}}} "},
/* Mark end of table */
{0, 0}
};
@@ -3387,6 +3393,11 @@ do_spec_1 (spec, inswitch, soft_matched_part)
}
break;
+ case 'O':
+ obstack_grow (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX));
+ arg_going = 1;
+ break;
+
case 's':
this_is_library_file = 1;
break;