Skip to content

Commit

Permalink
-mabi= pseudo support and pass -irix-symtab to gas (#2)
Browse files Browse the repository at this point in the history
* make cc1 to not choke with the -mabi flag

* Make gcc pass -mabi to gas

* Make gcc pass -irix-symtab to gas

* fix
  • Loading branch information
AngheloAlf authored Jun 6, 2024
1 parent afc9595 commit f3a3921
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions gcc/config/mips/mips.c
Original file line number Diff line number Diff line change
Expand Up @@ -4094,8 +4094,8 @@ override_options ()
error ("The -mabi=32 support does not work yet.");

#else
if (mips_abi_string)
error ("This target does not support the -mabi switch.");
//if (mips_abi_string)
// error ("This target does not support the -mabi switch.");
#endif

#ifdef MIPS_CPU_STRING_DEFAULT
Expand Down
1 change: 1 addition & 0 deletions gcc/config/mips/mips.h
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ extern void mips_select_section ();
SUBTARGET_TARGET_OPTIONS \
{ "cpu=", &mips_cpu_string }, \
{ "ips", &mips_isa_string }, \
{ "abi=", &mips_abi_string }, \
{ "entry", &mips_entry_string }, \
{ "no-mips16", &mips_no_mips16_string } \
}
Expand Down
12 changes: 6 additions & 6 deletions gcc/gcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ static struct compiler default_compilers[] =
%{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \
%{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 %a %Y\
%{!S:as %a %Y %{mabi*} %{irix-symtab}\
%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
%{!pipe:%g.s} %A\n }}}}"
}},
Expand All @@ -677,7 +677,7 @@ static struct compiler default_compilers[] =
%{--help:--help} \
%{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 %a %Y\
%{!S:as %a %Y %{mabi*} %{irix-symtab}\
%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
%{!pipe:%g.s} %A\n }}}}"
}},
Expand Down Expand Up @@ -716,7 +716,7 @@ static struct compiler default_compilers[] =
%{aux-info*}\
%{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 %a %Y\
%{!S:as %a %Y %{mabi*} %{irix-symtab}\
%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
%{!pipe:%g.s} %A\n }}}}"}},
{".h", {"@c-header"}},
Expand All @@ -741,12 +741,12 @@ static struct compiler default_compilers[] =
%{aux-info*}\
%{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 %a %Y\
%{!S:as %a %Y %{mabi*} %{irix-symtab}\
%{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 %a %Y\
{"%{!M:%{!MM:%{!E:%{!S:as %a %Y %{mabi*} %{irix-symtab}\
%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
%i %A\n }}}}"}},
{".S", {"@assembler-with-cpp"}},
Expand All @@ -760,7 +760,7 @@ static struct compiler default_compilers[] =
%{traditional-cpp:-traditional}\
%{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 %a %Y\
"%{!M:%{!MM:%{!E:%{!S:as %a %Y %{mabi*} %{irix-symtab}\
%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
%{!pipe:%g.s} %A\n }}}}"}},
#include "specs.h"
Expand Down

0 comments on commit f3a3921

Please sign in to comment.