From 125708b8e3afa6007ce3aa7132165d27b719ccc3 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Thu, 28 Feb 2013 10:54:44 +0800 Subject: Fix MIPS GCC to emit -m elf32ltsmip for linker ARM/X86 GCC in NDK explicitly emit -m armelf_linux_eabi and -m elf_i386, respectively, for linker. Fix MIPS to do the same, to help mclinker which is built vanilla and relies on either filename (eg. eg. arm-linux-androideabi-ld.mcd implies arm) or -mtriple/-march/-m to figure out the target Change-Id: I236786d0e90a3152225de1eea5e73e3de4ac3f84 --- gcc-4.4.3/gcc/config/mips/linux.h | 1 + gcc-4.6/gcc/config/mips/linux.h | 1 + gcc-4.7/gcc/config/mips/gnu-user.h | 1 + 3 files changed, 3 insertions(+) diff --git a/gcc-4.4.3/gcc/config/mips/linux.h b/gcc-4.4.3/gcc/config/mips/linux.h index 136356b26..5d3a8579a 100644 --- a/gcc-4.4.3/gcc/config/mips/linux.h +++ b/gcc-4.4.3/gcc/config/mips/linux.h @@ -71,6 +71,7 @@ along with GCC; see the file COPYING3. If not see #undef LINUX_SUBTARGET_LINK_SPEC #define LINUX_SUBTARGET_LINK_SPEC \ "%(endian_spec) \ + %{!EB:%{!meb:-m elf32ltsmip}} %{EB|meb:-m elf32btsmip} \ %{shared:-shared} \ %{!shared: \ %{!ibcs: \ diff --git a/gcc-4.6/gcc/config/mips/linux.h b/gcc-4.6/gcc/config/mips/linux.h index 6104463c4..ec60a9b83 100644 --- a/gcc-4.6/gcc/config/mips/linux.h +++ b/gcc-4.6/gcc/config/mips/linux.h @@ -68,6 +68,7 @@ along with GCC; see the file COPYING3. If not see #undef LINUX_SUBTARGET_LINK_SPEC #define LINUX_SUBTARGET_LINK_SPEC \ "%(endian_spec) \ + %{!EB:%{!meb:-m elf32ltsmip}} %{EB|meb:-m elf32btsmip} \ %{shared:-shared} \ %{!shared: \ %{!static: \ diff --git a/gcc-4.7/gcc/config/mips/gnu-user.h b/gcc-4.7/gcc/config/mips/gnu-user.h index 33e7b51a9..533a74083 100644 --- a/gcc-4.7/gcc/config/mips/gnu-user.h +++ b/gcc-4.7/gcc/config/mips/gnu-user.h @@ -60,6 +60,7 @@ along with GCC; see the file COPYING3. If not see #define LINUX_SUBTARGET_LINK_SPEC \ "%(endian_spec) \ %{shared:-shared} \ + %{!EB:%{!meb:-m elf32ltsmip}} %{EB|meb:-m elf32btsmip} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ -- cgit v1.2.3