config.gcc (sparc64-wrs-vxworks*): New case.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Tue, 2 Jan 2001 02:53:47 +0000 (02:53 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 2 Jan 2001 02:53:47 +0000 (21:53 -0500)
* config.gcc (sparc64-wrs-vxworks*): New case.
* config/sparc/vxsparc64.h, config/sparc/t-vxsparc64: New files.

From-SVN: r38609

gcc/ChangeLog
gcc/config.gcc
gcc/config/sparc/t-vxsparc64 [new file with mode: 0644]
gcc/config/sparc/vxsparc64.h [new file with mode: 0644]

index 442a998..04c810f 100644 (file)
@@ -1,5 +1,8 @@
 Mon Jan  1 21:28:29 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
+       * config.gcc (sparc64-wrs-vxworks*): New case.
+       * config/sparc/vxsparc64.h, config/sparc/t-vxsparc64: New files.
+
        * config/sparc/sparc.c (sparc_override_options): Do support different
        pointer and architecture size.
        * config/sparc/sparc.h (MIN_UNITS_PER_WORD): Always 4.
index 0d55123..5a2ea13 100644 (file)
@@ -1,5 +1,5 @@
 # GCC build-, host- and target-specific configuration file.
-# Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 #This file is part of GNU CC.
 
@@ -2950,6 +2950,11 @@ sparc-tti-*)
        xm_file="xm-alloca.h ${xm_file}"
        xm_defines=USG
        ;;
+sparc64-wrs-vxworks*)
+        tm_file="sparc/sol2.h sparc/elf.h sparc/vxsparc64.h"
+        tmake_file=sparc/t-vxsparc64
+        use_collect2=yes
+        ;;
 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
        tm_file=sparc/vxsparc.h
        tmake_file=sparc/t-vxsparc
diff --git a/gcc/config/sparc/t-vxsparc64 b/gcc/config/sparc/t-vxsparc64
new file mode 100644 (file)
index 0000000..23efb37
--- /dev/null
@@ -0,0 +1,32 @@
+LIBGCC1 =
+CROSS_LIBGCC1 =
+
+# We don't want to build .umul, etc., because VxWorks provides them,
+# which means that libgcc1-test will fail.
+LIBGCC1_TEST =
+
+# We don't want to put exit in libgcc.a for VxWorks, because VxWorks
+# does not have _exit.
+TARGET_LIBGCC2_CFLAGS = -Dexit=unused_exit
+
+# fp-bit and dp-bit are really part of libgcc1, but this will cause
+# them to be built correctly, so... [taken from t-sparclite]
+LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+       echo '#define US_SOFTWARE_GOFAST' > dp-bit.c
+       cat $(srcdir)/config/fp-bit.c >> dp-bit.c
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+       echo '#define FLOAT' > fp-bit.c
+       echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c
+       cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+MULTILIB_OPTIONS=O0
+MULTILIB_DIRNAMES=O0
+MULTILIB_MATCHES=
+MULTILIB_EXCEPTIONS=
+MULTILIB_EXTRA_OPTS=m64 mcpu=ultrasparc
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
diff --git a/gcc/config/sparc/vxsparc64.h b/gcc/config/sparc/vxsparc64.h
new file mode 100644 (file)
index 0000000..e3ce9c3
--- /dev/null
@@ -0,0 +1,95 @@
+/* Definitions of target machine for GNU compiler.
+   64-bit VxWorks Sparc version.
+   Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Specify this in a cover file to provide bi-architecture (32/64) support.  */
+#define SPARC_BI_ARCH
+
+/* Specify what to link with.  */
+/* VxWorks does all the library stuff itself.  */
+#undef LIB_SPEC
+#define        LIB_SPEC "-r"
+
+/* VxWorks provides the functionality of crt0.o and friends itself.  */
+#undef  STARTFILE_SPEC
+#undef ENDFILE_SPEC
+#define        STARTFILE_SPEC ""
+#define        ENDFILE_SPEC ""
+
+#undef LINK_SPEC
+#define LINK_SPEC ""
+
+/* We need to prohibit dots in constructor labels so that we can build a
+   table of { string, address } entries for each non-static name in a
+   program.  The address, being of the form &name, it cannot contain a dot or
+   C will try to parse it as a &struct.field phrase. */
+#undef NO_DOLLAR_IN_LABEL
+#undef DOLLARS_IN_IDENTIFIERS
+#define DOLLARS_IN_IDENTIFIERS 1
+#define NO_DOT_IN_LABEL
+
+/* Enable #pragma pack(n) */
+#define HANDLE_SYSV_PRAGMA
+
+/* We use stabs for debugging */
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+
+/* Longs are still only 32bits for vxWorks, even for UltraSPARC */
+#undef LONG_TYPE_SIZE
+#define LONG_TYPE_SIZE          32
+
+#undef CPP_ARCH32_SPEC
+#define CPP_ARCH32_SPEC "-Acpu(sparc) -Amachine(sparc)"
+#undef CPP_ARCH64_SPEC
+#define CPP_ARCH64_SPEC \
+"-Dsparc64 -D__arch64__ -Acpu(sparc64) -Amachine(sparc64)"
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-D__vxworks -D__sparc__ -Dsparc -D__GCC_NEW_VARARGS__"
+
+/* Note that we define CPU here even if the user has specified -ansi.
+   This violates user namespace, but the VxWorks headers, and potentially
+   user code, all explicitly rely upon the definition of CPU in order to get
+   the proper processor information.  */
+#undef CPP_SPEC
+#define CPP_SPEC "%(cpp_cpu) %(cpp_arch) -DCPU=ULTRASPARC -D__CPU__=CPU"
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT (MASK_APP_REGS | MASK_EPILOGUE | MASK_FPU \
+                       | MASK_LONG_DOUBLE_128 | MASK_64BIT)
+
+#undef SPARC_DEFAULT_CMODEL
+#define SPARC_DEFAULT_CMODEL CM_MEDLOW
+
+#undef PTRDIFF_TYPE
+#undef SIZE_TYPE
+#undef WCHAR_TYPE
+#undef WCHAR_TYPE_SIZE
+
+#define PTRDIFF_TYPE "long int"
+#define SIZE_TYPE "unsigned int"
+#define WCHAR_TYPE "char"
+#define WCHAR_TYPE_SIZE 8
+
+/* US Software GOFAST library support.  */
+#include "gofast.h"
+#undef INIT_SUBTARGET_OPTABS
+#define INIT_SUBTARGET_OPTABS INIT_GOFAST_OPTABS