summaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-03 09:17:56 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-03 09:17:56 +0000
commit223f6dbc6235113e669ea3ada06498afc21c40bf (patch)
tree2d1466559c15d4b47a081aa9b6bea3d4d4b84343 /gcc/config/mips
parent58606959931c9f33aa13bdbb5908d63c9cedf742 (diff)
downloadgcc-223f6dbc6235113e669ea3ada06498afc21c40bf.tar.gz
gcc/
* config.gcc (mips-wrs-vxworks): Add vx-common.h to tm_file. Set the default --with-arch setting to mips2. * config/mips/t-vxworks (MULTILIB_OPTIONS, MULTILIB_MATCHES) (MULTILIB_EXCEPTIONS): Redefine with new multilibs. (MULTILIB_OSDIRNAMES): Delete. (MULTILIB_DIRNAMES): Define. * config/mips/vxworks.h (LINK_SPEC): Add VXWORKS_LINK_SPEC. (LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Define. (TARGET_OS_CPP_BUILTINS): Incorporate old SUBTARGET_CPP_SPEC definitions, except for _WRS_R3K_EXC_SUPPORT. Call VXWORKS_OS_CPP_BUILTINS. (SUBTARGET_CPP_SPEC): Redefine to VXWORKS_ADDITIONAL_CPP_SPEC. (MIPS_DEBUGGING_INFO): Undefine. (FUNCTION_PROFILER): Define to VXWORKS_FUNCTION_PROFILER. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123459 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/t-vxworks29
-rw-r--r--gcc/config/mips/vxworks.h36
2 files changed, 43 insertions, 22 deletions
diff --git a/gcc/config/mips/t-vxworks b/gcc/config/mips/t-vxworks
index 51e006aa902..01a9a5f24fa 100644
--- a/gcc/config/mips/t-vxworks
+++ b/gcc/config/mips/t-vxworks
@@ -1,16 +1,17 @@
-# Multilibs for VxWorks.
-
-# default is mips1 EB hard-float
-MULTILIB_OPTIONS = mips2/mips3 EL msoft-float
-MULTILIB_MATCHES = EL=mel mips2=mips32 mips3=mips4 mips3=mips64
-
-MULTILIB_EXCEPTIONS = EL EL/msoft-float mips3/msoft-float mips3/EL/msoft-float
+# Multilibs for VxWorks. We want these 8 architecture combinations:
+#
+# {-mips2,-mips3} x {-EB,-EL} x {-mhard-float,-msoft-float}
+#
+# where the first option in each group is the default. The -mips2
+# multilibs use o32 and the -mips3 multilibs use o64.
+#
+# We want three multilibs for each architecture combination:
+# default (kernel mode), -mrtp and -mrtp/-fPIC.
+MULTILIB_OPTIONS = mabi=o64 mips3 EL msoft-float mrtp fPIC
+MULTILIB_DIRNAMES = o64 mips3 EL msoft-float mrtp pic
+MULTILIB_MATCHES = EL=mel fPIC=fpic
+MULTILIB_EXCEPTIONS = mips3* mabi=o64 fPIC \
+ $(addprefix mabi=o64/, EL* msoft-float* mrtp* fPIC*) \
+ $(addsuffix /fPIC, *mabi=o64 *mips3 *EL *msoft-float)
MUTLILIB_EXTRA_OPTS = -G 0 -mno-branch-likely
-
-MULTILIB_OSDIRNAMES = msoft-float=!MIPS32sfr3kgnu \
- mips2=!MIPS32gnu mips2/msoft-float=!MIPS32sfgnu \
- mips2/EL=!MIPS32gnule \
- mips2/EL/msoft-float=!MIPS32sfgnule \
- mips3=!MIPS64gnu mips3/EL=!MIPS64gnule
-
diff --git a/gcc/config/mips/vxworks.h b/gcc/config/mips/vxworks.h
index bf37901bac3..574221f3f99 100644
--- a/gcc/config/mips/vxworks.h
+++ b/gcc/config/mips/vxworks.h
@@ -46,23 +46,43 @@ Boston, MA 02110-1301, USA. */
#define LINK_SPEC "\
%(endian_spec) \
%{!G:-G 0} %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64} \
-%{bestGnum}"
+%{bestGnum}" \
+VXWORKS_LINK_SPEC
+
+#undef LIB_SPEC
+#define LIB_SPEC VXWORKS_LIB_SPEC
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
- builtin_define ("__vxworks"); \
- builtin_assert ("system=unix"); \
+ if (TARGET_64BIT) \
+ builtin_define ("CPU=MIPS64"); \
+ else \
+ builtin_define ("CPU=MIPS32"); \
+ if (TARGET_BIG_ENDIAN) \
+ builtin_define ("MIPSEB"); \
+ else \
+ builtin_define ("MIPSEL"); \
+ if (TARGET_SOFT_FLOAT) \
+ builtin_define ("SOFT_FLOAT"); \
+ VXWORKS_OS_CPP_BUILTINS (); \
} \
while (0)
#undef SUBTARGET_CPP_SPEC
-#define SUBTARGET_CPP_SPEC \
-"%{!DCPU=*: %{mips3|mips4|mips64:-DCPU=MIPS64;:-DCPU=MIPS32}} \
- %{EL|mel:-DMIPSEL;:-DMIPSEB} \
- %{msoft-float:-DSOFT_FLOAT} \
- %{mips1:-D_WRS_R3K_EXC_SUPPORT}"
+#define SUBTARGET_CPP_SPEC VXWORKS_ADDITIONAL_CPP_SPEC
/* No sdata. */
#undef MIPS_DEFAULT_GVALUE
#define MIPS_DEFAULT_GVALUE 0
+
+/* Other formats are already disabled in config/vxworks.h. */
+#undef MIPS_DEBUGGING_INFO
+
+/* No _mcount profiling on VxWorks. */
+#undef FUNCTION_PROFILER
+#define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER