This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch] MIPS: Fix -march=native.
- From: David Daney <ddaney at caviumnetworks dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 01 Dec 2008 09:12:08 -0800
- Subject: [Patch] MIPS: Fix -march=native.
A new feature of GCC for 4.4 is that the mips port now support
-march=native (and -mcpu=native). Unfortunately it was broken for 64
bit targets by this patch:
http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00334.html
The fix is to add LINUX_DRIVER_SELF_SPECS to the DRIVER_SELF_SPECS
definition in linux64.h as was done for linux.h.
Tested on mips64-linux-gnu with --with-arch=native (and --with-float=soft).
OK to commit?
2008-12-01 David Daney <ddaney@caviumnetworks.com>
Adam Nemet <anemet@caviumnetworks.com>
* config/mips/linux64.h (DRIVER_SELF_SPECS): Add
LINUX_DRIVER_SELF_SPECS.
Index: config/mips/linux64.h
===================================================================
--- config/mips/linux64.h (revision 142323)
+++ config/mips/linux64.h (working copy)
@@ -22,9 +22,10 @@ along with GCC; see the file COPYING3.
in order to make the other specs easier to write. */
#undef DRIVER_SELF_SPECS
#define DRIVER_SELF_SPECS \
-BASE_DRIVER_SELF_SPECS \
-" %{!EB:%{!EL:%(endian_spec)}}" \
-" %{!mabi=*: -mabi=n32}"
+ BASE_DRIVER_SELF_SPECS, \
+ LINUX_DRIVER_SELF_SPECS \
+ " %{!EB:%{!EL:%(endian_spec)}}" \
+ " %{!mabi=*: -mabi=n32}"
#undef LIB_SPEC
#define LIB_SPEC "\