Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2010 01:47:59 +0000 (UTC)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r204993 - user/jmallett/octeon/contrib/gcc/config/mips
Message-ID:  <201003110147.o2B1lxBS024953@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmallett
Date: Thu Mar 11 01:47:59 2010
New Revision: 204993
URL: http://svn.freebsd.org/changeset/base/204993

Log:
  Integrate MIPS_CPU_STRING_DEFAULT into DRIVER_SELF_SPECS so that we see it as
  an argument and can pass it to the assembler.  It'd be nice if the mips.h
  assembler and linker specs could take into account the CPU architecture as it
  may be intuited within GCC rather than having to do this.  This is so ugly.
  
  Then again, it's pretty stupid to refuse to link modules using the same ABI but
  different -march values.  Perhaps fixing binutils and undoing some of this is
  the right way to go.

Modified:
  user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h

Modified: user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h
==============================================================================
--- user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h	Thu Mar 11 01:35:38 2010	(r204992)
+++ user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h	Thu Mar 11 01:47:59 2010	(r204993)
@@ -255,23 +255,37 @@ Boston, MA 02110-1301, USA.  */
   while (0)
 
 /* Default ABI and ISA */
+/*
+ * XXX/juli
+ * Shouldn't this also be dependent on !mips*?
+ */
+#ifdef MIPS_CPU_STRING_DEFAULT
+#define DRIVER_SELF_ISA_SPEC	"{!march=*: -march=" MIPS_CPU_STRING_DEFAULT "}"
+#else
+#define	DRIVER_SELF_ISA_SPEC	"{!march=*: -march=from-abi}"
+#endif
+
 #undef DRIVER_SELF_SPECS
 #if MIPS_ABI_DEFAULT == ABI_N32
 #define DRIVER_SELF_SPECS \
 	"%{!EB:%{!EL:%(endian_spec)}}", \
-	"%{!mabi=*: -mabi=n32}"
+	"%{!mabi=*: -mabi=n32}", \
+	DRIVER_SELF_ISA_SPEC
 #elif MIPS_ABI_DEFAULT == ABI_64
 #define DRIVER_SELF_SPECS \
 	"%{!EB:%{!EL:%(endian_spec)}}", \
-	"%{!mabi=*: -mabi=64}"
+	"%{!mabi=*: -mabi=64}", \
+	DRIVER_SELF_ISA_SPEC
 #elif MIPS_ABI_DEFAULT == ABI_O64
 #define DRIVER_SELF_SPECS \
 	"%{!EB:%{!EL:%(endian_spec)}}", \
-	"%{!mabi=*: -mabi=o64}"
+	"%{!mabi=*: -mabi=o64}", \
+	DRIVER_SELF_ISA_SPEC
 #else /* default to o32 */
 #define DRIVER_SELF_SPECS \
 	"%{!EB:%{!EL:%(endian_spec)}}", \
-	"%{!mabi=*: -mabi=32}"
+	"%{!mabi=*: -mabi=32}", \
+	DRIVER_SELF_ISA_SPEC
 #endif
 
 #if 0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003110147.o2B1lxBS024953>