aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-08 16:14:11 +0000
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-08 16:14:11 +0000
commitabf7fbd69e40bc26e4c7fc1f65f06a22860d91c0 (patch)
treeff27406ceb4b11ed5de307e18fda1ecc56be84e0 /gcc/config/mips
parent32e654a8ffe86f6b8d2f8599ba3d7cdbea49dbc1 (diff)
2014-10-08 Steve Ellcey <sellcey@mips.com>
* config/mips/linux64.h: Remove. * config/mips/gnu-user64.h: Remove. * gcc.config (mips*-*-*): Remove references to linux64.h and gnu-user64.h * config/mips/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Replace with modified version from gnu-user64.h. (LINUX_DRIVER_SELF_SPECS): Update parts from gnu-user64.h. (LOCAL_LABEL_PREFIX): Copy from gnu-user64.h. * config/mips/linux.h (GNU_USER_LINK_EMULATION32): Copy from linux64.h. (GNU_USER_LINK_EMULATION64): Ditto. (GNU_USER_LINK_EMULATIONN32): Ditto. (GLIBC_DYNAMIC_LINKER32): Ditto. (GLIBC_DYNAMIC_LINKER64): Ditto. (GLIBC_DYNAMIC_LINKERN32): Ditto. (UCLIBC_DYNAMIC_LINKER32): Ditto. (UCLIBC_DYNAMIC_LINKER64): Ditto. (UCLIBC_DYNAMIC_LINKERN32): Ditto. (BIONIC_DYNAMIC_LINKERN32): Ditto. (GNU_USER_DYNAMIC_LINKERN32): Ditto. (GLIBC_DYNAMIC_LINKER): Delete. (UCLIBC_DYNAMIC_LINKER): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216008 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/gnu-user.h23
-rw-r--r--gcc/config/mips/gnu-user64.h52
-rw-r--r--gcc/config/mips/linux.h24
-rw-r--r--gcc/config/mips/linux64.h44
4 files changed, 37 insertions, 106 deletions
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
index 638d7f0f5c8..6c02054bf2e 100644
--- a/gcc/config/mips/gnu-user.h
+++ b/gcc/config/mips/gnu-user.h
@@ -52,16 +52,20 @@ along with GCC; see the file COPYING3. If not see
#undef MIPS_DEFAULT_GVALUE
#define MIPS_DEFAULT_GVALUE 0
-/* Borrowed from sparc/linux.h */
#undef GNU_USER_TARGET_LINK_SPEC
-#define GNU_USER_TARGET_LINK_SPEC \
- "%(endian_spec) \
- %{shared:-shared} \
+#define GNU_USER_TARGET_LINK_SPEC "\
+ %{G*} %{EB} %{EL} %{mips*} %{shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
- %{static:-static}}"
+ %{mabi=n32: -dynamic-linker " GNU_USER_DYNAMIC_LINKERN32 "} \
+ %{mabi=64: -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "} \
+ %{mabi=32: -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \
+ %{static}} \
+ %{mabi=n32:-m" GNU_USER_LINK_EMULATIONN32 "} \
+ %{mabi=64:-m" GNU_USER_LINK_EMULATION64 "} \
+ %{mabi=32:-m" GNU_USER_LINK_EMULATION32 "}"
+
#undef LINK_SPEC
#define LINK_SPEC GNU_USER_TARGET_LINK_SPEC
@@ -122,7 +126,9 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
specs handling by removing a redundant option. */ \
"%{!mno-shared:%<mplt}", \
/* -mplt likewise has no effect for -mabi=64 without -msym32. */ \
- "%{mabi=64:%{!msym32:%<mplt}}"
+ "%{mabi=64:%{!msym32:%<mplt}}", \
+ "%{!EB:%{!EL:%(endian_spec)}}", \
+ "%{!mabi=*: -" MULTILIB_ABI_DEFAULT "}"
#undef DRIVER_SELF_SPECS
#define DRIVER_SELF_SPECS \
@@ -137,3 +143,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#define ENDFILE_SPEC \
GNU_USER_TARGET_MATHFILE_SPEC " " \
GNU_USER_TARGET_ENDFILE_SPEC
+
+#undef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX (TARGET_OLDABI ? "$" : ".")
diff --git a/gcc/config/mips/gnu-user64.h b/gcc/config/mips/gnu-user64.h
deleted file mode 100644
index b97b4a76848..00000000000
--- a/gcc/config/mips/gnu-user64.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Definitions for MIPS systems using GNU userspace and n32/64 abi.
- Copyright (C) 2002-2014 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-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/>. */
-
-/* Force the default endianness and ABI flags onto the command line
- in order to make the other specs easier to write. */
-
-#define LINUX64_DRIVER_SELF_SPECS \
- LINUX_DRIVER_SELF_SPECS \
- " %{!EB:%{!EL:%(endian_spec)}}" \
- " %{!mabi=*: -" MULTILIB_ABI_DEFAULT "}"
-
-#undef DRIVER_SELF_SPECS
-#define DRIVER_SELF_SPECS \
- BASE_DRIVER_SELF_SPECS, \
- LINUX64_DRIVER_SELF_SPECS
-
-#undef GNU_USER_TARGET_LINK_SPEC
-#define GNU_USER_TARGET_LINK_SPEC "\
-%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
-%{shared} \
- %(endian_spec) \
- %{!shared: \
- %{!static: \
- %{rdynamic:-export-dynamic} \
- %{mabi=n32: -dynamic-linker " GNU_USER_DYNAMIC_LINKERN32 "} \
- %{mabi=64: -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "} \
- %{mabi=32: -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \
- %{static:-static}} \
-%{mabi=n32:-m" GNU_USER_LINK_EMULATIONN32 "} \
-%{mabi=64:-m" GNU_USER_LINK_EMULATION64 "} \
-%{mabi=32:-m" GNU_USER_LINK_EMULATION32 "}"
-#undef LINK_SPEC
-#define LINK_SPEC GNU_USER_TARGET_LINK_SPEC
-
-#undef LOCAL_LABEL_PREFIX
-#define LOCAL_LABEL_PREFIX (TARGET_OLDABI ? "$" : ".")
diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
index e539422d48d..a117f90fb03 100644
--- a/gcc/config/mips/linux.h
+++ b/gcc/config/mips/linux.h
@@ -17,9 +17,27 @@ 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/>. */
-#define GLIBC_DYNAMIC_LINKER \
+#define GNU_USER_LINK_EMULATION32 "elf32%{EB:b}%{EL:l}tsmip"
+#define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
+#define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
+
+#define GLIBC_DYNAMIC_LINKER32 \
"%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
+#define GLIBC_DYNAMIC_LINKER64 \
+ "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
+#define GLIBC_DYNAMIC_LINKERN32 \
+ "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
-#undef UCLIBC_DYNAMIC_LINKER
-#define UCLIBC_DYNAMIC_LINKER \
+#undef UCLIBC_DYNAMIC_LINKER32
+#define UCLIBC_DYNAMIC_LINKER32 \
"%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
+#undef UCLIBC_DYNAMIC_LINKER64
+#define UCLIBC_DYNAMIC_LINKER64 \
+ "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
+#define UCLIBC_DYNAMIC_LINKERN32 \
+ "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
+
+#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+#define GNU_USER_DYNAMIC_LINKERN32 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+ BIONIC_DYNAMIC_LINKERN32)
diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h
deleted file mode 100644
index 7ad3b2af2b9..00000000000
--- a/gcc/config/mips/linux64.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Definitions for MIPS running Linux-based GNU systems with ELF format
- using n32/64 abi.
- Copyright (C) 2002-2014 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-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/>. */
-
-#define GNU_USER_LINK_EMULATION32 "elf32%{EB:b}%{EL:l}tsmip"
-#define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
-#define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
-
-#define GLIBC_DYNAMIC_LINKER32 \
- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
-#define GLIBC_DYNAMIC_LINKER64 \
- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
-#define GLIBC_DYNAMIC_LINKERN32 \
- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
-
-#undef UCLIBC_DYNAMIC_LINKER32
-#define UCLIBC_DYNAMIC_LINKER32 \
- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
-#undef UCLIBC_DYNAMIC_LINKER64
-#define UCLIBC_DYNAMIC_LINKER64 \
- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
-#define UCLIBC_DYNAMIC_LINKERN32 \
- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-
-#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
-#define GNU_USER_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
- BIONIC_DYNAMIC_LINKERN32)