This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add various VxWorks target configs (1/3)


Phil Edwards wrote:
I'll post an updated patch shortly.

Thus. This takes Nathanael's suggestions (thanks!) into account. Same changelog entry as before.

The TARGET_VERSION stuff, by the way, was just copied from the older versions
of these files.  We can certainly get rid of them all at some later point.



Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.403
diff -u -p -r1.403 config.gcc
--- config.gcc	20 Oct 2003 06:27:31 -0000	1.403
+++ config.gcc	21 Oct 2003 03:29:57 -0000
@@ -495,8 +495,13 @@ case ${target} in
 *-*-vxworks*)
   tmake_file=t-vxworks
   tm_file="${tm_file} elfos.h svr4.h vxworks.h"
-  thread_file='vxworks'
+  case ${enable_threads} in
+    no) ;;
+    "" | yes | vxworks) thread_file='vxworks' ;;
+    *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
+  esac
   use_collect2=yes
+  xm_defines=POSIX
   ;;
 esac

@@ -608,6 +613,10 @@ arm-semi-aof | armel-semi-aof)
tm_file="arm/semiaof.h arm/aof.h arm/arm.h"
tmake_file=arm/t-semi
;;
+arm-wrs-vxworks)
+ tm_file="dbxelf.h elfos.h svr4.h vxworks.h arm/elf.h arm/aout.h arm/arm.h arm/vxworks.h"
+ tmake_file="${tmake_file} arm/t-vxworks"
+ ;;
arm*-*-freebsd*|strongarm*-*-freebsd*)
tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
tmake_file="${tmake_file} arm/t-strongarm-elf"
@@ -1085,6 +1094,10 @@ i386-*-vsta) # Intel 80386's running V
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/vsta.h"
use_fixproto=yes
;;
+i[4567]86-wrs-vxworks)
+ tm_file="${tm_file} i386/sysv4.h i386/unix.h i386/vxworks.h"
+ tmake_file="${tmake_file} i386/t-vxworks"
+ ;;
i[34567]86-*-pe | i[34567]86-*-cygwin*)
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h"
xm_file=i386/xm-cygwin.h
@@ -1547,6 +1560,20 @@ mips*-*-rtems*)
tm_file="${tm_file} mips/elf.h mips/rtems.h rtems.h"
tmake_file="mips/t-elf t-rtems mips/t-rtems"
;;
+mips-wrs-vxworks)
+ # We want vxworks.h after mips/elf.h, which unfortunately means we
+ # have to redo the tm_file list from scratch.
+ tm_file="elfos.h mips/mips.h svr4.h mips/elf.h vxworks.h mips/vxworks.h"
+ tmake_file="${tmake_file} mips/t-vxworks"
+ target_cpu_default="MASK_GAS"
+ ;;
+mips-wrs-windiss) # Instruction-level simulator for VxWorks.
+ xm_defines=POSIX
+ tm_file="elfos.h mips/mips.h svr4.h mips/elf.h windiss.h mips/windiss.h"
+ tmake_file="${tmake_file} mips/t-elf"
+ target_cpu_default="MASK_GAS"
+ thread_file=
+ ;;
mipstx39-*-elf* | mipstx39el-*-elf*)
tm_file="${tm_file} mips/r3900.h mips/elf.h"
tmake_file=mips/t-r3900
@@ -1696,7 +1723,7 @@ powerpc-wrs-vxworks*)
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
extra_headers=ppc-asm.h
;;
-powerpc-wrs-windiss*)
+powerpc-wrs-windiss*) # Instruction-level simulator for VxWorks.
tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/windiss.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
thread_file=""
@@ -1882,6 +1909,10 @@ sh-*-netbsdelf* | shl*-*-netbsdelf* | sh
tmake_file="${tmake_file} sh/t-netbsd"
;;
esac
+ ;;
+sh-wrs-vxworks)
+ tmake_file="$tmake_file sh/t-sh sh/t-elf sh/t-vxworks"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h sh/vxworks.h"
;;
sh-*-*)
tm_file="${tm_file} dbxcoff.h sh/coff.h"
Index: genmultilib
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genmultilib,v
retrieving revision 1.12
diff -u -p -r1.12 genmultilib
--- genmultilib 17 Dec 2002 21:17:35 -0000 1.12
+++ genmultilib 21 Oct 2003 03:29:57 -0000
@@ -63,10 +63,15 @@
# for the rule to exclude a set. Options can be preceded with a '!' to
# match a logical NOT.


-# The optional sevenths argument is a list of OS subdirectory names.
-# The format is the same as of the second argument.
-# The difference is that second argument describes multilib directories
-# in GCC conventions, while this one the OS multilib convention.
+# The optional seventh argument is a list of OS subdirectory names.
+# The format is either the same as of the second argument, or a set of
+# mappings. When it is the same as the second argument, it describes
+# the multilib directories using OS conventions, rather than GCC
+# conventions.  When it is a set of mappings of the form gccdir=osdir,
+# the left side gives the GCC convention and the right gives the
+# equivalent OS defined location.  If the osdir part begins with a !,
+# the os directory names are used exclusively.  Use the mapping when
+# there is no one-to-one equivalence between GCC levels and the OS.

 # The last option should be "yes" if multilibs are enabled.  If it is not
 # "yes", all GCC multilib dir names will be ".".
@@ -216,24 +221,44 @@ fi
 # Construct a sed pattern which will convert option names to OS directory
 # names.
 toosdirnames=
+defaultosdirname=
 if [ -n "${osdirnames}" ]; then
   set x ${osdirnames}
   shift
-  for set in ${options}; do
-    for opts in `echo ${set} | sed -e 's|/| |'g`; do
-      patt="/"
-      for opt in `echo ${opts} | sed -e 's_|_ _'g`; do
-        if [ "$1" != "${opt}" ]; then
-          toosdirnames="${toosdirnames} -e s|/${opt}/|/${1}/|g"
-	  patt="${patt}${1}/"
-	  if [ "${patt}" != "/${1}/" ]; then
-	    toosdirnames="${toosdirnames} -e s|${patt}|/${1}/|g"
+  while [ $# != 0 ] ; do
+    case "$1" in
+      .=*)
+        defaultosdirname=`echo $1 | sed 's|^.=|:|'`
+	shift
+	;;
+      *=*)
+	patt=`echo $1 | sed -e 's|=|/$=/|'`
+        toosdirnames="${toosdirnames} -e s=^/${patt}/="
+	shift
+        ;;
+      *)
+        break
+	;;
+    esac
+  done
+
+  if [ $# != 0 ]; then
+    for set in ${options}; do
+      for opts in `echo ${set} | sed -e 's|/| |'g`; do
+        patt="/"
+        for opt in `echo ${opts} | sed -e 's_|_ _'g`; do
+          if [ "$1" != "${opt}" ]; then
+            toosdirnames="${toosdirnames} -e s|/${opt}/|/${1}/|g"
+	    patt="${patt}${1}/"
+	    if [ "${patt}" != "/${1}/" ]; then
+	      toosdirnames="${toosdirnames} -e s|${patt}|/${1}/|g"
+            fi
           fi
-        fi
+        done
+        shift
       done
-      shift
     done
-  done
+  fi
 fi

 # We need another recursive shell script to correctly handle positive
@@ -275,7 +300,7 @@ for set in ${options}; do
   done
 done
 optout=`echo ${optout} | sed -e 's/^ //'`
-echo "\". ${optout};\","
+echo "\".${defaultosdirname} ${optout};\","

 # Work over the list of combinations.  We have to translate each one
 # to use the directory names rather than the option names, we have to
@@ -299,7 +324,14 @@ for combo in ${combinations}; do
     if [ "x${enable_multilib}" != xyes ]; then
       dirout=".:${osdirout}"
     else
-      dirout="${dirout}:${osdirout}"
+      case "${osdirout}" in
+        !*)
+	  dirout=`echo ${osdirout} | sed 's/^!//'`
+	  ;;
+	*)
+	  dirout="${dirout}:${osdirout}"
+	  ;;
+      esac
     fi
   else
     if [ "x${enable_multilib}" != xyes ]; then
Index: config/svr4.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/svr4.h,v
retrieving revision 1.31
diff -u -p -r1.31 svr4.h
--- config/svr4.h	6 Jul 2003 18:50:44 -0000	1.31
+++ config/svr4.h	21 Oct 2003 03:29:57 -0000
@@ -41,6 +41,7 @@ Boston, MA 02111-1307, USA.
    -z* options (for the linker).  Note however that there is no such
    thing as a -T option for svr4.  */

+#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) \
(DEFAULT_SWITCH_TAKES_ARG (CHAR) \
|| (CHAR) == 'h' \
Index: config/windiss.h
===================================================================
RCS file: config/windiss.h
diff -N config/windiss.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/windiss.h 21 Oct 2003 03:29:57 -0000
@@ -0,0 +1,38 @@
+/* Support for GCC using WindISS simulator.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ Contributed by CodeSourcery, LLC.
+
+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 2, 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 COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+/* windiss uses wchar_t == unsigned short (UCS2) on all architectures. */
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "short unsigned int"
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 16
+
+/* windiss has wint_t == int */
+#undef WINT_TYPE
+#define WINT_TYPE "int"
+
+/* No profiling. */
+#undef FUNCTION_PROFILER
+#define FUNCTION_PROFILER(FILE, LABELNO) \
+{ \
+ sorry ("profiler support for WindISS"); \
+}
Index: config/arm/t-vxworks
===================================================================
RCS file: config/arm/t-vxworks
diff -N config/arm/t-vxworks
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/arm/t-vxworks 21 Oct 2003 03:29:57 -0000
@@ -0,0 +1,10 @@
+# Multilibs for VxWorks.
+
+MULTILIB_OPTIONS = \
+ t4/t4be/t4t/t4tbe/t5/t5be/t5t/t5tbe/txscale/txscalebe
+
+MULTILIB_DIRNAMES = \
+ ARMARCH4gnu ARMARCH4gnube ARMARCH4_Tgnu ARMARCH4_Tgnube \
+ ARMARCH5gnu ARMARCH5gnube ARMARCH5_Tgnu ARMARCH5_Tgnube \
+ XSCALEgnu XSCALEgnube
+
Index: config/arm/vxworks.h
===================================================================
RCS file: config/arm/vxworks.h
diff -N config/arm/vxworks.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/arm/vxworks.h 21 Oct 2003 03:29:57 -0000
@@ -0,0 +1,95 @@
+/* Definitions of target machine for GCC,
+ for ARM with targetting the VXWorks run time environment.
+ Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+
+ Contributed by: Mike Stump <mrs@wrs.com>
+ Brought up to date by CodeSourcery, LLC.
+
+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 2, 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 COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do { \
+ builtin_define ("__vxworks"); \
+ if (TARGET_BIG_END) \
+ builtin_define ("ARMEB"); \
+ else \
+ builtin_define ("ARMEL"); \
+ \
+ if (arm_is_xscale) \
+ builtin_define ("CPU=XSCALE"); \
+ else if (arm_arch5) \
+ builtin_define ("CPU=ARMARCH5"); \
+ else if (arm_arch4) \
+ { \
+ if (thumb_code) \
+ builtin_define ("CPU=ARMARCH4_T"); \
+ else \
+ builtin_define ("CPU=ARMARCH4"); \
+ } \
+ } while (0)
+
+#undef CC1_SPEC
+#define CC1_SPEC \
+"%{t4: -mapcs-32 -mlittle-endian -march=armv4 ; \
+ t4be: -mapcs-32 -mbig-endian -march=armv4 ; \
+ t4t: -mthumb -mthumb-interwork -mlittle-endian -march=armv4t ; \
+ t4tbe: -mthumb -mthumb-interwork -mbig-endian -march=armv4t ; \
+ t5: -mapcs-32 -mlittle-endian -march=armv5 ; \
+ t5be: -mapcs-32 -mbig-endian -march=armv5 ; \
+ t5t: -mthumb -mthumb-interwork -mlittle-endian -march=armv5 ; \
+ t5tbe: -mthumb -mthumb-interwork -mbig-endian -march=armv5 ; \
+ txscale: -mapcs-32 -mlittle-endian -mcpu=xscale ; \
+ txscalebe: -mapcs-32 -mbig-endian -mcpu=xscale ; \
+ : -march=armv4}"
+
+/* The -Q options from svr4.h aren't understood and must be removed. */
+#undef ASM_SPEC
+#define ASM_SPEC \
+ "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
+
+/* VxWorks does all the library stuff itself. */
+#undef LIB_SPEC
+#define LIB_SPEC ""
+
+/* VxWorks uses object files, not loadable images. make linker just
+ combine objects. */
+#undef LINK_SPEC
+#define LINK_SPEC "-r"
+
+/* VxWorks provides the functionality of crt0.o and friends itself. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC ""
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC ""
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (ARM/VxWorks)", stderr);
+
+/* There is no default multilib. */
+#undef MULTILIB_DEFAULTS
+
+#undef ASM_FILE_START
+#define ASM_FILE_START(STREAM) \
+ do \
+ { \
+ fprintf (STREAM, "%s Generated by GCC %s for ARM/VxWorks\n", \
+ ASM_COMMENT_START, version_string); \
+ } \
+ while (0)
Index: config/i386/t-vxworks
===================================================================
RCS file: config/i386/t-vxworks
diff -N config/i386/t-vxworks
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/i386/t-vxworks 21 Oct 2003 03:29:57 -0000
@@ -0,0 +1,8 @@
+# Multilibs for VxWorks.
+
+#GCC does not have an arch=pentium3 setting, so we cannot build PENTIUM3gnu
+MULTILIB_OPTIONS = \
+ march=i486/march=pentium/march=pentiumpro/march=pentium4
+MULTILIB_DIRNAMES = \
+ I80486 PENTIUMgnu PENTIUM2gnu PENTIUM4gnu
+
Index: config/i386/vxworks.h
===================================================================
RCS file: config/i386/vxworks.h
diff -N config/i386/vxworks.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/i386/vxworks.h 21 Oct 2003 03:29:57 -0000
@@ -0,0 +1,74 @@
+/* Definitions of target machine for GCC. VxWorks i586 version.
+ Copyright (C) 2003 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 2, 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 COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+#define HANDLE_SYSV_PRAGMA 1
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (80586, VxWorks syntax)");
+
+/* Prefix for internally generated assembler labels. If we aren't using
+ underscores, we are using prefix `.'s to identify labels that should
+ be ignored, as in `i386/gas.h' --karl@cs.umb.edu */
+
+#define LPREFIX "L"
+
+/* Assembler pseudos to introduce constants of various size. */
+
+#define ASM_SHORT "\t.word\t"
+#define ASM_LONG "\t.long\t"
+#define ASM_QUAD "\t.quad\t" /* Should not be used for 32bit compilation. */
+
+
+#define ASM_OUTPUT_ALIGN(FILE,LOG) \
+ if ((LOG)!=0) fprintf ((FILE), "\t.balign %d\n", 1<<(LOG))
+
+#undef ASM_SPEC
+#define ASM_SPEC "%{v:-V} %{Qy:} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__vxworks"); \
+ builtin_assert ("system=unix"); \
+ \
+ if (TARGET_386) \
+ builtin_define ("CPU=I80386"); \
+ else if (TARGET_486) \
+ builtin_define ("CPU=I80486"); \
+ else if (TARGET_PENTIUM) \
+ { \
+ builtin_define ("CPU=PENTIUM"); \
+ builtin_define ("CPU_VARIANT=PENTIUM"); \
+ } \
+ else if (TARGET_PENTIUMPRO) \
+ { \
+ builtin_define ("CPU=PENTIUM2"); \
+ builtin_define ("CPU_VARIANT=PENTIUMPRO"); \
+ } \
+ else if (TARGET_PENTIUM4) \
+ { \
+ builtin_define ("CPU=PENTIUM4"); \
+ builtin_define ("CPU_VARIANT=PENTIUM4"); \
+ } \
+ } \
+ while (0)
+
+
Index: config/mips/t-vxworks
===================================================================
RCS file: config/mips/t-vxworks
diff -N config/mips/t-vxworks
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/mips/t-vxworks 21 Oct 2003 03:29:57 -0000
@@ -0,0 +1,16 @@
+# 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
+
+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
+
Index: config/mips/vxworks.h
===================================================================
RCS file: config/mips/vxworks.h
diff -N config/mips/vxworks.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/mips/vxworks.h 21 Oct 2003 03:29:57 -0000
@@ -0,0 +1,79 @@
+/* Copyright (C) 1999, 2003 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 2, 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 COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#undef EXTRA_SECTIONS
+#define EXTRA_SECTIONS in_sdata, in_sbss
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS \
+ SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
+ SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP)
+
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (MIPS, VxWorks syntax)");
+
+/* Combination of mips.h and svr4.h. */
+#undef SWITCH_TAKES_ARG
+#define SWITCH_TAKES_ARG(CHAR) \
+ (DEFAULT_SWITCH_TAKES_ARG (CHAR) \
+ || (CHAR) == 'G' \
+ || (CHAR) == 'h' \
+ || (CHAR) == 'x' \
+ || (CHAR) == 'z')
+
+#undef ASM_SPEC
+#define ASM_SPEC "\
+%{!G:-G 0} %{G*} %(endian_spec) %{mips1} %{mips2} %{mips3} %{mips4} \
+%{mips32} %{mips32r2} %{mips64} \
+%{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} \
+%(subtarget_asm_optimizing_spec) \
+%(subtarget_asm_debugging_spec) \
+%{membedded-pic} \
+%{mabi=32:-32}%{mabi=n32:-n32}%{mabi=64:-64}%{mabi=n64:-64} \
+%{mabi=eabi} %{mabi=o64} %{!mabi*: %(asm_abi_default_spec)} \
+%{mgp32} %{mgp64} %{march=*} %{mxgot:-xgot} \
+%(target_asm_spec) \
+%(subtarget_asm_spec)"
+
+#undef LINK_SPEC
+/* LINK_SPEC is clobbered in svr4.h. ugh! */
+#define LINK_SPEC "\
+%(endian_spec) \
+%{!G:-G 0} %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64} \
+%{bestGnum}"
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__vxworks"); \
+ builtin_assert ("system=unix"); \
+ } \
+ 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}"
+
+/* No sdata. */
+#undef MIPS_DEFAULT_GVALUE
+#define MIPS_DEFAULT_GVALUE 0
Index: config/mips/windiss.h
===================================================================
RCS file: config/mips/windiss.h
diff -N config/mips/windiss.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/mips/windiss.h 21 Oct 2003 03:29:57 -0000
@@ -0,0 +1,103 @@
+/* Support for GCC on MIPS using WindISS simulator.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Contributed by CodeSourcery, LLC.
+
+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 2, 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 COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (MIPS WindISS)");
+
+/* Combination of mips.h and svr4.h. */
+#undef SWITCH_TAKES_ARG
+#define SWITCH_TAKES_ARG(CHAR) \
+ (DEFAULT_SWITCH_TAKES_ARG (CHAR) \
+ || (CHAR) == 'G' \
+ || (CHAR) == 'h' \
+ || (CHAR) == 'x' \
+ || (CHAR) == 'z')
+
+#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}"
+
+#undef ASM_SPEC
+#define ASM_SPEC "\
+%{!G:-G 0} %{G*} %(endian_spec) %{mips1} %{mips2} %{mips3} %{mips4} \
+%{mips32} %{mips32r2} %{mips64} \
+%{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} \
+%(subtarget_asm_optimizing_spec) \
+%(subtarget_asm_debugging_spec) \
+%{membedded-pic} \
+%{mabi=32:-32}%{mabi=n32:-n32}%{mabi=64:-64}%{mabi=n64:-64} \
+%{mabi=eabi} %{mabi=o64} %{!mabi*: %(asm_abi_default_spec)} \
+%{mgp32} %{mgp64} %{march=*} %{mxgot:-xgot} \
+%(target_asm_spec) \
+%(subtarget_asm_spec)"
+
+#undef LINK_SPEC
+/* LINK_SPEC is clobbered in svr4.h. ugh! */
+#define LINK_SPEC "\
+-m elf32mipswindiss \
+%{!G:-G 0} %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64} \
+%{bestGnum}"
+
+/* Diab libs MIPS{,E,F,L,M,W,X,Y,Z}{,H,N,S}
+
+ .
+ E - Elf (small-data/const=8
+ F - Elf Far (small-data/const=0)
+ L - Little Elf
+ M - Little Elf Far
+ W - elf32 bigmips
+ X - elf32 bigmips (far?)
+ Y - elf32 littlemips
+ Z - elf32 littlemips (far?)
+
+ . - Integer routines
+ H - Hard float
+ N - No float
+ S - Soft float
+
+ Want {F,M}{,H,S}
+
+*/
+
+#undef LIB_SPEC
+#define LIB_SPEC "--start-group -li -lcfp -lwindiss -lram -limpl -limpfp --end-group"
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crt0.o%s crtbegin.o%s"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "crtend.o%s"
+
+/* We have no shared libraries. These two shouldn't be necessary. */
+#undef LINK_SHLIB_SPEC
+#define LINK_SHLIB_SPEC ""
+#undef LINK_EH_SPEC
+#define LINK_EH_SPEC ""
+
+#undef CRTSAVRES_DEFAULT_SPEC
+#define CRTSAVRES_DEFAULT_SPEC ""
+
+/* No sdata. */
+#undef MIPS_DEFAULT_GVALUE
+#define MIPS_DEFAULT_GVALUE 0
Index: config/sh/t-vxworks
===================================================================
RCS file: config/sh/t-vxworks
diff -N config/sh/t-vxworks
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/sh/t-vxworks 21 Oct 2003 03:29:57 -0000
@@ -0,0 +1,11 @@
+# Multilibs for VxWorks.
+
+MULTILIB_OPTIONS = m2/m3/m4 ml
+
+MULTILIB_EXCEPTIONS = ml m2/ml
+
+MULTILIB_OSDIRNAMES = \
+ m2=!SH7600gnu \
+ m3=!SH7700gnu m3/ml=!SH7700gnule \
+ m4=!SH7750gnu m4/ml=!SH7750gnule
+
Index: config/sh/vxworks.h
===================================================================
RCS file: config/sh/vxworks.h
diff -N config/sh/vxworks.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ config/sh/vxworks.h 21 Oct 2003 03:29:57 -0000
@@ -0,0 +1,50 @@
+/* Definitions of target machine for GCC,
+ for SuperH with targeting the VXWorks run time environment.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ Contributed by CodeSourcery, LLC.
+
+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 2, 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 COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do { \
+ builtin_define ("__vxworks"); \
+ builtin_define ("CPU=SH7000"); \
+ } while (0)
+
+/* VxWorks does all the library stuff itself. */
+#undef LIB_SPEC
+#define LIB_SPEC ""
+
+/* VxWorks uses object files, not loadable images. Make the linker just
+ combine objects. */
+#undef LINK_SPEC
+#define LINK_SPEC "-r"
+
+/* VxWorks provides the functionality of crt0.o and friends itself. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC ""
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC ""
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (SH/VxWorks)", stderr);
+
+/* There is no default multilib. */
+#undef MULTILIB_DEFAULTS



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]