aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2003-08-04 20:23:15 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2003-08-04 20:23:15 +0000
commit38e596df667d2c263921e990d4e0cb3b4dbb8ead (patch)
treef70474dc845230a1fde65a533cc211b4904cf999
parent76d2e2c547be369f04a192181df7f0a8d79cd270 (diff)
downloadgcc-38e596df667d2c263921e990d4e0cb3b4dbb8ead.zip
gcc-38e596df667d2c263921e990d4e0cb3b4dbb8ead.tar.gz
gcc-38e596df667d2c263921e990d4e0cb3b4dbb8ead.tar.bz2
mips.c (override_options): Disable -G on targets that have no .section support.
* config/mips/mips.c (override_options): Disable -G on targets that have no .section support. (mips_select_section): Use default_select_section for such targets. From-SVN: r70154
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/mips/mips.c12
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 583b6fc..ee5f70b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-04 Richard Sandiford <rsandif@redhat.com>
+
+ * config/mips/mips.c (override_options): Disable -G on targets that
+ have no .section support.
+ (mips_select_section): Use default_select_section for such targets.
+
2003-08-04 Nathanael Nerode <neroden@gcc.gnu.org>
* fixinc/inclhack.def (svr4_undeclared_getrnge): Introduce and enable.
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 122e44b..9fe8bbf 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -5059,6 +5059,13 @@ override_options ()
if (!TARGET_EXPLICIT_RELOCS && !TARGET_GAS)
mips_section_threshold = 0;
+ /* We switch to small data sections using ".section", which the native
+ o32 irix assemblers don't understand. Disable -G accordingly.
+ We must do this regardless of command-line options since otherwise
+ the compiler would abort. */
+ if (!targetm.have_named_sections)
+ mips_section_threshold = 0;
+
/* -membedded-pic is a form of PIC code suitable for embedded
systems. All calls are made using PC relative addressing, and
all data is addressed using the $gp register. This requires gas,
@@ -7879,8 +7886,11 @@ mips_select_section (decl, reloc, align)
For mips16 code, put strings in the text section so that a PC
relative load instruction can be used to get their address. */
text_section ();
- else
+ else if (targetm.have_named_sections)
default_elf_select_section (decl, reloc, align);
+ else
+ /* The native irix o32 assembler doesn't support named sections. */
+ default_select_section (decl, reloc, align);
}