Base support for vxworks 7 on aarch64
authorDoug Rupp <rupp@adacore.com>
Thu, 14 Nov 2019 16:05:08 +0000 (16:05 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Thu, 14 Nov 2019 16:05:08 +0000 (16:05 +0000)
2019-11-14  Doug Rupp  <rupp@adacore.com>
           Olivier Hainque  <hainque@adacore.com>
           Jerome Lambourg  <lambourg@adacore.com>

       gcc/
       * config.gcc: Handle aarch64*-wrs-vxworks7*.
       * config/aarch64/aarch64-vxworks.h: New file.
       * config/aarch64/t-aarch64-vxworks: New file.

       libgcc/
       * config.host: Handle aarch64*-wrs-vxworks7*.

Co-Authored-By: Jerome Lambourg <lambourg@adacore.com>
Co-Authored-By: Olivier Hainque <hainque@adacore.com>
From-SVN: r278251

gcc/ChangeLog
gcc/config.gcc
gcc/config/aarch64/aarch64-vxworks.h [new file with mode: 0644]
gcc/config/aarch64/t-aarch64-vxworks [new file with mode: 0644]
libgcc/ChangeLog
libgcc/config.host

index e24af4944ec123bc0b6211d5803df90eae4b0e88..6e7b7cc5d6d637526d17b4a48335756bbdbc4334 100644 (file)
@@ -1,3 +1,11 @@
+2019-11-14  Doug Rupp  <rupp@adacore.com>
+           Olivier Hainque  <hainque@adacore.com>
+           Jerome Lambourg  <lambourg@adacore.com>
+
+       * config.gcc: Handle aarch64*-wrs-vxworks7*.
+       * config/aarch64/aarch64-vxworks.h: New file.
+       * config/aarch64/t-aarch64-vxworks: New file.
+
 2019-11-06  Jerome Lambourg  <lambourg@adacore.com>
            Olivier Hainque  <hainque@adacore.com>
 
index aa9a79c08ded353e8b888bb409e20e3b8e529325..ea45b44a212ba4d88ff9e7b7e895416c7a4fe266 100644 (file)
@@ -1076,6 +1076,11 @@ aarch64*-*-linux*)
        done
        TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
        ;;
+aarch64*-wrs-vxworks*)
+        tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h"
+        tm_file="${tm_file} vx-common.h vxworks.h aarch64/aarch64-vxworks.h"
+        tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-vxworks"
+        ;;
 alpha*-*-linux*)
        tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
        tmake_file="${tmake_file} alpha/t-linux alpha/t-alpha"
diff --git a/gcc/config/aarch64/aarch64-vxworks.h b/gcc/config/aarch64/aarch64-vxworks.h
new file mode 100644 (file)
index 0000000..de3b3c8
--- /dev/null
@@ -0,0 +1,71 @@
+/* Definitions of target machine for GNU compiler.  Vxworks Aarch 64bit
+   version.
+   Copyright (C) 2018-2019 Free Software Foundation, Inc.
+   Contributed by Douglas B Rupp
+
+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/>.  */
+
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
+
+#undef LINK_SPEC
+#define LINK_SPEC 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
+
+#undef CPP_SPEC
+#define CPP_SPEC VXWORKS_ADDITIONAL_CPP_SPEC
+
+#undef CC1_SPEC
+#define CC1_SPEC VXWORKS_CC1_SPEC
+
+#undef FUNCTION_PROFILER
+#define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS()         \
+  do {                                   \
+    if (TARGET_BIG_END)                         \
+      builtin_define ("ARMEB");                 \
+    else                                        \
+      builtin_define ("ARMEL");                 \
+    builtin_define ("_VX_CPU=ARMARCH8A"); \
+    VXWORKS_OS_CPP_BUILTINS ();                  \
+  } while (0)
+
+/* Static stack checking is supported.  */
+#define STACK_CHECK_STATIC_BUILTIN 1
+
+#undef STACK_CHECK_PROTECT
+#define STACK_CHECK_PROTECT 16384
+
+/* The VxWorks environment on aarch64 is llvm-based only, uses R18 as
+   a TCB pointer.  */
+
+#undef VXWORKS_PERSONALITY
+#define VXWORKS_PERSONALITY "llvm"
+
+#undef  TARGET_OS_USES_R18
+#define TARGET_OS_USES_R18 1
+
diff --git a/gcc/config/aarch64/t-aarch64-vxworks b/gcc/config/aarch64/t-aarch64-vxworks
new file mode 100644 (file)
index 0000000..33c2510
--- /dev/null
@@ -0,0 +1,22 @@
+# Multilibs for VxWorks.
+#
+# Copyright (C) 2018 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/>.
+
+MULTILIB_OPTIONS += mrtp
+MULTILIB_DIRNAMES += mrtp
index ccd72ea417dd156e453a9a372687d8796a4d478c..dfb30a6571f0e3ee49a2773f8ab9f31ea889eaf0 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-14  Doug Rupp  <rupp@adacore.com>
+           Olivier Hainque  <hainque@adacore.com>
+
+       * config.host: Handle aarch64*-wrs-vxworks7*.
+
 2019-11-12  Olivier Hainque  <hainque@adacore.com>
 
        * config/t-gthr-vxworksae: New file, add all the gthr-vxworks
index 4950303044653ddd5a42cc6e235cd4451493c393..1c8d63be83793fd6d9351a81343bcf2524c799af 100644 (file)
@@ -392,6 +392,12 @@ aarch64*-*-linux*)
        tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
        tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
        ;;
+aarch64*-*-vxworks7*)
+       extra_parts="$extra_parts crtfastmath.o"
+       md_unwind_header=aarch64/aarch64-unwind.h
+       tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+       tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+       ;;
 alpha*-*-linux*)
        tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm alpha/t-linux"
        extra_parts="$extra_parts crtfastmath.o"