diff mbox

[MIPS] Fix SYSROOT_SUFFIX_SPEC for mips-mti-linux-gnu

Message ID adf3e720-2ef1-4354-a591-34c42bf7bfa2@BAMAIL02.ba.imgtec.org
State New
Headers show

Commit Message

Steve Ellcey July 9, 2015, 5:08 p.m. UTC
This patch enables builds with mips[32|64]r3 and mips[32|64]r5 in the
mips-mti-linux-gnu toolchain.  t-mti-linux uses MULTILIB_MATCHES to
map these to r2 but SYSROOT_SUFFIX_SPEC was not being set properly
to find the sysroot (the r2 one) for these architectures.  This patch
fixes that problem by updating MIPS_SYSVERSION_SPEC which is used
by SYSROOT_SUFFIX_SPEC.  It will only affect the mips-mti-linux-gnu
toolchain.

Tested with mips-mti-linux-gnu, OK to checkin?

Steve Ellcey
sellcey@imgtec.com



2015-07-09  Steve Ellcey  <sellcey@imgtec.com>

	* config/mips/mti-linux.h (MIPS_SYSVERSION_SPEC): Update
	to handle mips[32|64]r3 and mips[32|64]r5.

Comments

Matthew Fortune July 9, 2015, 7:36 p.m. UTC | #1
> 2015-07-09  Steve Ellcey  <sellcey@imgtec.com>
> 
> 	* config/mips/mti-linux.h (MIPS_SYSVERSION_SPEC): Update
> 	to handle mips[32|64]r3 and mips[32|64]r5.

OK, thanks.

Matthew
diff mbox

Patch

diff --git a/gcc/config/mips/mti-linux.h b/gcc/config/mips/mti-linux.h
index 03d1baa..b497625 100644
--- a/gcc/config/mips/mti-linux.h
+++ b/gcc/config/mips/mti-linux.h
@@ -17,10 +17,14 @@  You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-/* This target is a multilib target, specify the sysroot paths.  */
-#define MIPS_SYSVERSION_SPEC					\
-    "%{mips32:r1}%{mips64:r1}%{mips32r2:r2}%{mips64r2:r2}"	\
-    "%{mips32r6:r6}%{mips64r6:r6}%{mips16:-mips16}"
+/* This target is a multilib target, specify the sysroot paths.
+   MIPS_SYSVERSION_SPEC defaults to 'r2' (mips32r2 or mips64r2) unless
+   'r1' or 'r6' are specifically given so that mips32r3, mips32r5,
+   mips64r3, and mips64r5 will all default to 'r2'.  See MULTILIB_MATCHES
+   definition in t-mti-linux.  */
+
+#define MIPS_SYSVERSION_SPEC \
+    "%{mips32|mips64:r1;mips32r6|mips64r6:r6;:r2}%{mips16:-mips16}"
 
 #undef SYSROOT_SUFFIX_SPEC
 #define SYSROOT_SUFFIX_SPEC						\