configure.ac: Add aarch64-*-freebsd*.
authorAndreas Tobler <andreast@gcc.gnu.org>
Mon, 10 Oct 2016 21:31:17 +0000 (23:31 +0200)
committerAndreas Tobler <andreast@gcc.gnu.org>
Mon, 10 Oct 2016 21:31:17 +0000 (23:31 +0200)
toplevel:

2016-10-10  Andreas Tobler <andreast@gcc.gnu.org>

    * configure.ac: Add aarch64-*-freebsd*.
    * configure: Regenerate.

gcc:

2016-10-10  Andreas Tobler  <andreast@gcc.gnu.org>

    * config.gcc: Add aarch64-*-freebsd* support.
    * config.host: Likewise.
    * config/aarch64/aarch64-freebsd.h: New file.
    * config/aarch64/t-aarch64-freebsd: Ditto.

libgcc:

2016-10-10  Andreas Tobler  <andreast@gcc.gnu.org>

    * config.host: Add support for aarch64-*-freebsd*.

From-SVN: r240949

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

index 4e97477d311e86e7c0e119d3b5a0b6c8d3ea15c9..82d068ef53118ec3fa6381caa23f89f92c8be146 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-10  Andreas Tobler <andreast@gcc.gnu.org>
+
+       * configure.ac: Add aarch64-*-freebsd*.
+       * configure: Regenerate.
+
 2016-10-05  Steve Ellcey  <sellcey@caviumnetworks.com>
 
        * MAINTAINERS: Update email address after it got reverted.
index f9650c92765b4af57e5c02f99b8c1f163b9c89ab..0da041ab4d498e72759a998f0eee73d17633c3ed 100755 (executable)
--- a/configure
+++ b/configure
@@ -3385,6 +3385,9 @@ case "${target}" in
   *-*-vxworks*)
     noconfigdirs="$noconfigdirs target-libffi"
     ;;
+  aarch64*-*-freebsd*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
   alpha*-*-*vms*)
     noconfigdirs="$noconfigdirs target-libffi"
     ;;
index aec703a19f08c3f474dcfd052804bf91b24bd993..9fe987a7530b5b5f913c21b950aa8cdaa3c42087 100644 (file)
@@ -727,6 +727,9 @@ case "${target}" in
   *-*-vxworks*)
     noconfigdirs="$noconfigdirs target-libffi"
     ;;
+  aarch64*-*-freebsd*)
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
   alpha*-*-*vms*)
     noconfigdirs="$noconfigdirs target-libffi"
     ;;
index 16e25bfe2d3df5892f7c606fcd996160d9eee606..d5de3c3c3c267205be3bd3bb35bc16457bb15d9f 100644 (file)
@@ -1,3 +1,10 @@
+2016-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
+
+       * config.gcc: Add aarch64-*-freebsd* support.
+       * config.host: Likewise.
+       * config/aarch64/aarch64-freebsd.h: New file.
+       * config/aarch64/t-aarch64-freebsd: Ditto.
+
 2016-10-10  Jeff Law  <law@redhat.com>
 
         PR tree-optimization/71947
index 8fd07c5ce8cb026cb4b35c22f5be495becd126fb..7bbf5464073c0bf9b954baa2fb831a4f0fc5ffd3 100644 (file)
@@ -937,6 +937,11 @@ aarch64*-*-elf | aarch64*-*-rtems*)
        done
        TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
        ;;
+aarch64*-*-freebsd*)
+       tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file}"
+       tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-freebsd.h"
+       tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
+       ;;
 aarch64*-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
        tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
index 44f2f56ff7502a513b89002b0e2c96518a67ea96..5b3c75714ee9098b8ff012b6f3ddc8dbcdfc6c76 100644 (file)
@@ -99,7 +99,7 @@ case ${host} in
 esac
 
 case ${host} in
-  aarch64*-*-linux*)
+  aarch64*-*-freebsd* | aarch64*-*-linux*)
     case ${target} in
       aarch64*-*-*)
        host_extra_gcc_objs="driver-aarch64.o"
diff --git a/gcc/config/aarch64/aarch64-freebsd.h b/gcc/config/aarch64/aarch64-freebsd.h
new file mode 100644 (file)
index 0000000..6b2a908
--- /dev/null
@@ -0,0 +1,94 @@
+/* Definitions for AArch64 running FreeBSD
+   Copyright (C) 2016 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/>.  */
+
+#ifndef GCC_AARCH64_FREEBSD_H
+#define GCC_AARCH64_FREEBSD_H
+
+#undef  SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC FBSD_CPP_SPEC
+
+#if TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_LINKER_EMULATION  "aarch64fbsdb"
+#else
+#define TARGET_LINKER_EMULATION  "aarch64fbsd"
+#endif
+
+#undef  SUBTARGET_EXTRA_LINK_SPEC
+#define SUBTARGET_EXTRA_LINK_SPEC " -m" TARGET_LINKER_EMULATION
+
+#undef  FBSD_TARGET_LINK_SPEC
+#define FBSD_TARGET_LINK_SPEC "                                 \
+    %{p:%nconsider using `-pg' instead of `-p' with gprof (1) } \
+    %{v:-V}                                                     \
+    %{assert*} %{R*} %{rpath*} %{defsym*}                       \
+    %{shared:-Bshareable %{h*} %{soname*}}                      \
+    %{symbolic:-Bsymbolic}                                      \
+    %{static:-Bstatic}                                          \
+    %{!static:                                                  \
+      %{rdynamic:-export-dynamic}                               \
+      %{!shared:-dynamic-linker " FBSD_DYNAMIC_LINKER " }}      \
+    -X" SUBTARGET_EXTRA_LINK_SPEC "                             \
+    %{mbig-endian:-EB} %{mlittle-endian:-EL}"
+
+#if TARGET_FIX_ERR_A53_835769_DEFAULT
+#define CA53_ERR_835769_SPEC \
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#else
+#define CA53_ERR_835769_SPEC \
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#endif
+
+#ifdef TARGET_FIX_ERR_A53_843419_DEFAULT
+#define CA53_ERR_843419_SPEC \
+  " %{!mno-fix-cortex-a53-843419:--fix-cortex-a53-843419}"
+#else
+#define CA53_ERR_843419_SPEC \
+  " %{mfix-cortex-a53-843419:--fix-cortex-a53-843419}"
+#endif
+
+#undef  LINK_SPEC
+#define LINK_SPEC FBSD_TARGET_LINK_SPEC        \
+                  CA53_ERR_835769_SPEC \
+                  CA53_ERR_843419_SPEC
+
+#define GNU_USER_TARGET_MATHFILE_SPEC \
+  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+    GNU_USER_TARGET_MATHFILE_SPEC " " \
+    FBSD_ENDFILE_SPEC
+
+#undef  TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS()              \
+  do                                          \
+  {                                           \
+      FBSD_TARGET_OS_CPP_BUILTINS ();         \
+  }                                           \
+  while (false)
+
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
+/* Uninitialized common symbols in non-PIE executables, even with
+   strong definitions in dependent shared libraries, will resolve
+   to COPY relocated symbol in the executable.  See PR65780.  */
+#undef TARGET_BINDS_LOCAL_P
+#define TARGET_BINDS_LOCAL_P default_binds_local_p_2
+
+#endif  /* GCC_AARCH64_FREEBSD_H */
diff --git a/gcc/config/aarch64/t-aarch64-freebsd b/gcc/config/aarch64/t-aarch64-freebsd
new file mode 100644 (file)
index 0000000..84b4a75
--- /dev/null
@@ -0,0 +1,21 @@
+# Machine description for AArch64 architecture.
+#  Copyright (C) 2016 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/>.
+
+LIB1ASMSRC   = aarch64/lib1funcs.asm
+LIB1ASMFUNCS = _aarch64_sync_cache_range
index ce5a25024fc368050baff99f4a037e7f9f8c212a..f627591bedbcd9024064f27d80f3deac70b576c5 100644 (file)
@@ -1,3 +1,7 @@
+2016-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
+
+       * config.host: Add support for aarch64-*-freebsd*.
+
 2016-10-05  Andreas Schwab  <schwab@suse.de>
 
        * config/ia64/crtbegin.S (__do_jv_register_classes): Remove.
index 002f650be9a7cd6f69ce3d51639a735ca7eba564..1c90e233d579592e63de81dfdcc784425b8fcba2 100644 (file)
@@ -331,6 +331,11 @@ aarch64*-*-elf | aarch64*-*-rtems*)
        tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
        tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
        ;;
+aarch64*-*-freebsd*)
+       extra_parts="$extra_parts crtfastmath.o"
+       tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+       tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+       ;;
 aarch64*-*-linux*)
        extra_parts="$extra_parts crtfastmath.o"
        md_unwind_header=aarch64/linux-unwind.h