]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: [multiple changes]
authorAndreas Tobler <andreast@gcc.gnu.org>
Mon, 9 Jan 2017 21:06:20 +0000 (22:06 +0100)
committerAndreas Tobler <andreast@gcc.gnu.org>
Mon, 9 Jan 2017 21:06:20 +0000 (22:06 +0100)
2017-01-09  Andreas Tobler  <andreast@gcc.gnu.org>

toplevel:
    Backport from mainline
    2016-10-10  Andreas Tobler <andreast@gcc.gnu.org>

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

gcc:
    Backport from mainline
    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:
    Backport from mainline
    2016-10-10  Andreas Tobler  <andreast@gcc.gnu.org>

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

From-SVN: r244243

ChangeLog
configure
configure.ac
gcc/ChangeLog
gcc/config.gcc
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 e715661d8510948bfc6b78c51a3f89993c2f271b..e036320a1b8ead1d5223c30bf23f826a18c54294 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-01-09  Andreas Tobler  <andreast@gcc.gnu.org>
+
+       Backport from mainline
+       2016-10-10  Andreas Tobler <andreast@gcc.gnu.org>
+
+       * configure.ac: Add aarch64-*-freebsd*.
+       * configure: Regenerate.
+
 2016-08-31  Jakub Sejdak  <jakub.sejdak@phoesys.com>
 
        * config.sub: Add support for Phoenix-RTOS targets.
index a3f66bac77e435fb185bb34f36a7a57c23a05639..2ebce673451484b2a0b8da8fc670930f8269b43f 100755 (executable)
--- a/configure
+++ b/configure
@@ -3455,6 +3455,9 @@ case "${target}" in
   *-*-vxworks*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
+  aarch64*-*-freebsd*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
   alpha*-*-*vms*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
index 987dfab411dc9b597e3c73f8ccd3777a4352bb1c..bd4cb9a0c4f7c2d834e63bb2c93d61b0fac3a3a0 100644 (file)
@@ -802,6 +802,9 @@ case "${target}" in
   *-*-vxworks*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
+  aarch64*-*-freebsd*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
   alpha*-*-*vms*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
index 5d5ff83669de8b53fb72d742e3ed8640517cdf97..0b0c098f33248139a232c11835f9a55b77b88ac2 100644 (file)
@@ -1,3 +1,13 @@
+2017-01-09  Andreas Tobler  <andreast@gcc.gnu.org>
+
+       Backport from mainline
+       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.
+
 2017-01-03  Martin Liska  <mliska@suse.cz>
 
        Backport from mainline
index 313af3fc46b30e148e1d244ca75e5b58daf77831..7954a6224c412f8559d0f8203b135b1c77f6c72e 100644 (file)
@@ -914,6 +914,11 @@ aarch64*-*-elf)
        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"
diff --git a/gcc/config/aarch64/aarch64-freebsd.h b/gcc/config/aarch64/aarch64-freebsd.h
new file mode 100644 (file)
index 0000000..b9c1bfd
--- /dev/null
@@ -0,0 +1,94 @@
+/* Definitions for AArch64 running FreeBSD
+   Copyright (C) 2016-2017 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..9740118
--- /dev/null
@@ -0,0 +1,21 @@
+# Machine description for AArch64 architecture.
+#  Copyright (C) 2016-2017 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 71a8114f7ff53aa07937bd42331668bd61043068..49c7bd8a2fa0204cacd7d1d4f914434744cad834 100644 (file)
@@ -1,3 +1,10 @@
+2017-01-09  Andreas Tobler  <andreast@gcc.gnu.org>
+
+       Backport from mainline
+       2016-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
+
+       * config.host: Add support for aarch64-*-freebsd*.
+
 2016-11-07  Florian Weimer  <fweimer@redhat.com>
 
        Backport from mainline
index 9770242ffb1f073e7392a0da935c35bb9c0a7d76..a131693b02ee1fd631c51c14e90fe83e9e078fb9 100644 (file)
@@ -328,6 +328,11 @@ aarch64*-*-elf)
        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