summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-07 07:37:38 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-07 07:37:38 +0000
commit671264d986e2666ce30c428dd011341f26358a90 (patch)
tree78825ebde82f0901c736de2aa59b465e6c062d60 /config
parent6d7f615c389f96c6d911f29e107b6925beb91767 (diff)
downloadgcc-671264d986e2666ce30c428dd011341f26358a90.tar.gz
config/
* mt-sde (CFLAGS_FOR_TARGET): Add -mno-gpopt. (CXXFLAGS_FOR_TARGET): Likewise. gcc/ * doc/invoke.texi: Document the MIPS -mlocal-sdata, -mextern-sdata and -mgpopt options. Adjust the -G documentation to match. * config/mips/mips.opt (mextern-data, mgpopt, mlocal-data): New. * config/mips/mips.c (mips_rtx_constant_in_small_data_p): New function, split out from mips_classify_symbol. Return false for !TARGET_LOCAL_SDATA. (mips_classify_symbol): Call mips_rtx_constant_in_small_data_p. Only use GP-relative accesses for non-pool symbols if TARGET_GPOPT. (override_options): Check whether the -mgpopt setting is consistent with the other flags. (symbolic_expression_p): Delete. (mips_select_rtx_section): Use mips_rtx_constant_in_small_data_p and default_elf_select_rtx_section. (mips_in_small_data_p): Honor section attributes for MIPS16 too. Return false for local data unless TARGET_LOCAL_SDATA. Likewise external data and TARGET_EXTERN_SDATA. gcc/testsuite/ * gcc.dg/attr-alias-3.c: Use real asm for MIPS. * gcc.target/mips/mips.exp (setup_mips_tests): Set mips_forced_gp and mips_forced_no_er. (dg-mips-options): Add -mno-abicalls when a small-data option is specified. Skip tests with small-data options if mips_forced_gp. Skip tests with -mexplicit-relocs if mips_forced_no_er. * gcc.target/mips/sdata-1.c: New test. * gcc.target/mips/sdata-2.c: Likewise. * gcc.target/mips/sdata-3.c: Likewise. * gcc.target/mips/sdata-4.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128230 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'config')
-rw-r--r--config/ChangeLog5
-rw-r--r--config/mt-sde14
2 files changed, 13 insertions, 6 deletions
diff --git a/config/ChangeLog b/config/ChangeLog
index 30cb805b7aa..cb0b61a9ad0 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-07 Richard Sandiford <richard@codesourcery.com>
+
+ * mt-sde (CFLAGS_FOR_TARGET): Add -mno-gpopt.
+ (CXXFLAGS_FOR_TARGET): Likewise.
+
2007-08-18 Paul Brook <paul@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
diff --git a/config/mt-sde b/config/mt-sde
index e74616105cf..fbdc081fe33 100644
--- a/config/mt-sde
+++ b/config/mt-sde
@@ -1,8 +1,10 @@
# We default to building libraries optimised for size. We switch off
# sibling-call optimization to permit interlinking of MIPS16 and
-# non-MIPS16 functions. The -mcode-xonly option allows MIPS16
-# libraries to run on Harvard-style split I/D memories, so long as
-# they have the D-to-I redirect for pc-relative loads.
-
-CFLAGS_FOR_TARGET = -Os -fno-optimize-sibling-calls -mcode-xonly
-CXXFLAGS_FOR_TARGET = -Os -fno-optimize-sibling-calls -mcode-xonly
+# non-MIPS16 functions. The -mcode-xonly option allows MIPS16 libraries
+# to run on Harvard-style split I/D memories, so long as they have the
+# D-to-I redirect for PC-relative loads. -mno-gpopt has two purposes:
+# it allows libraries to be used in situations where $gp != our _gp,
+# and it allows them to be built with -G8 while retaining link compability
+# with -G0 and -G4.
+CFLAGS_FOR_TARGET = -Os -fno-optimize-sibling-calls -mcode-xonly -mno-gpopt
+CXXFLAGS_FOR_TARGET = -Os -fno-optimize-sibling-calls -mcode-xonly -mno-gpopt