summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-04 20:23:15 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-04 20:23:15 +0000
commit309a4783fb9fbcf86d24a1a2f189752e4ad574c3 (patch)
treef70474dc845230a1fde65a533cc211b4904cf999 /gcc/config
parent630af0399006b0eff9649a7d8668e18deb719899 (diff)
downloadgcc-309a4783fb9fbcf86d24a1a2f189752e4ad574c3.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70154 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/mips/mips.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 122e44bd142..9fe8bbf912c 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);
}