Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc First pass at mknative for aarch64, based ...



details:   https://anonhg.NetBSD.org/src/rev/a5dce68d474f
branches:  trunk
changeset: 320638:a5dce68d474f
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jul 14 23:47:31 2018 +0000

description:
First pass at mknative for aarch64, based on mrg's work.

diffstat:

 external/gpl3/gcc/dist/gcc/config.gcc                                 |     7 +
 external/gpl3/gcc/dist/gcc/config.host                                |     2 +-
 external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h            |    99 +
 external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64                   |     2 +
 external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd            |    21 +
 external/gpl3/gcc/dist/libgcc/config.host                             |     5 +
 external/gpl3/gcc/lib/libbacktrace/arch/aarch64/backtrace-supported.h |    70 +
 external/gpl3/gcc/lib/libbacktrace/arch/aarch64/config.h              |   139 +
 external/gpl3/gcc/lib/libgcc/arch/aarch64/auto-target.h               |    81 +
 external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk                     |    21 +
 external/gpl3/gcc/lib/libgcc/libgcov/arch/aarch64/defs.mk             |     8 +
 external/gpl3/gcc/lib/libgcc/libgcov/arch/aarch64/gcov-iov.h          |     8 +
 external/gpl3/gcc/lib/libgomp/arch/aarch64/config.h                   |   167 +
 external/gpl3/gcc/lib/libgomp/arch/aarch64/libgomp.spec               |     7 +
 external/gpl3/gcc/lib/libgomp/arch/aarch64/libgomp_f.h                |    98 +
 external/gpl3/gcc/lib/libgomp/arch/aarch64/omp.h                      |   169 +
 external/gpl3/gcc/lib/libiberty/arch/aarch64/config.h                 |   570 ++
 external/gpl3/gcc/lib/libobjc/arch/aarch64/config.h                   |    76 +
 external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk                    |    11 +
 external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/c++config.h           |  1906 ++++++++
 external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/cxxabi_tweaks.h       |    63 +
 external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/defs.mk               |    53 +
 external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/gstdint.h             |    51 +
 external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/gthr-posix.h          |   893 +++
 external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/gthr-single.h         |   302 +
 external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/gthr.h                |   158 +
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/all-tree.def               |     5 +
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/auto-host.h                |  2381 ++++++++++
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/bconfig.h                  |    11 +
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/bversion.h                 |     8 +
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/config.h                   |    14 +
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/configargs.h               |    11 +
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/defs.mk                    |    62 +
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/gtyp-input.list            |   232 +
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/insn-modes.h               |   830 +++
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/multilib.h                 |    24 +
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/plugin-version.h           |    22 +
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/tm.h                       |    46 +
 external/gpl3/gcc/usr.bin/include/arch/aarch64.mk                     |     5 +
 external/gpl3/gcc/usr.bin/libcpp/arch/aarch64/config.h                |   368 +
 external/gpl3/gcc/usr.bin/libdecnumber/arch/aarch64/config.h          |    99 +
 41 files changed, 9104 insertions(+), 1 deletions(-)

diffs (truncated from 9293 to 300 lines):

diff -r 6f2abf5acb70 -r a5dce68d474f external/gpl3/gcc/dist/gcc/config.gcc
--- a/external/gpl3/gcc/dist/gcc/config.gcc     Sat Jul 14 23:42:23 2018 +0000
+++ b/external/gpl3/gcc/dist/gcc/config.gcc     Sat Jul 14 23:47:31 2018 +0000
@@ -974,6 +974,13 @@
        tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-freebsd.h"
        tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
        ;;
+aarch64*-*-netbsd*)
+       tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file}"
+       tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-netbsd.h"
+       tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-netbsd"
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+       # XXX big endian
+       ;;
 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 -r 6f2abf5acb70 -r a5dce68d474f external/gpl3/gcc/dist/gcc/config.host
--- a/external/gpl3/gcc/dist/gcc/config.host    Sat Jul 14 23:42:23 2018 +0000
+++ b/external/gpl3/gcc/dist/gcc/config.host    Sat Jul 14 23:47:31 2018 +0000
@@ -99,7 +99,7 @@
 esac
 
 case ${host} in
-  aarch64*-*-freebsd* | aarch64*-*-linux*)
+  aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-netbsd*)
     case ${target} in
       aarch64*-*-*)
        host_extra_gcc_objs="driver-aarch64.o"
diff -r 6f2abf5acb70 -r a5dce68d474f external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h        Sat Jul 14 23:47:31 2018 +0000
@@ -0,0 +1,99 @@
+/* Definitions for AArch64 running NetBSD
+   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_NETBSD_H
+#define GCC_AARCH64_NETBSD_H
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS                          \
+  NETBSD_SUBTARGET_EXTRA_SPECS
+
+#define TARGET_LINKER_BIG_EMULATION "aarch64nbsdb"
+#define TARGET_LINKER_LITTLE_EMULATION "aarch64nbsd"
+
+#if TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_LINKER_EMULATION  TARGET_LINKER_BIG_EMULATION
+#else
+#define TARGET_LINKER_EMULATION  TARGET_LINKER_LITTLE_EMULATION
+#endif
+
+#undef  SUBTARGET_EXTRA_LINK_SPEC
+#define SUBTARGET_EXTRA_LINK_SPEC " -m" TARGET_LINKER_EMULATION
+
+#define NETBSD_TARGET_LINK_SPEC  "%{h*}                        \
+   -X %{mbig-endian:-EB -m " TARGET_LINKER_BIG_EMULATION "} \
+   %{mlittle-endian:-EL -m " TARGET_LINKER_LITTLE_EMULATION "} \
+   %(netbsd_link_spec)"
+
+#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 NETBSD_LINK_SPEC_ELF                 \
+                 NETBSD_TARGET_LINK_SPEC       \
+                  CA53_ERR_835769_SPEC         \
+                  CA53_ERR_843419_SPEC
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+      NETBSD_OS_CPP_BUILTINS_ELF();            \
+    }                                          \
+  while (0)
+
+#undef SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC
+
+#if 0
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+#endif
+
+#if 0
+/* 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
+
+/* Use the AAPCS type for wchar_t, override the one from
+   config/netbsd.h.  */
+#undef  WCHAR_TYPE
+#define WCHAR_TYPE  "unsigned int"
+
+#if 0
+#undef MCOUNT_NAME
+#define MCOUNT_NAME ".mcount"
+#endif
+
+#endif  /* GCC_AARCH64_NETBSD_H */
diff -r 6f2abf5acb70 -r a5dce68d474f external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64
--- a/external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64       Sat Jul 14 23:42:23 2018 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64       Sat Jul 14 23:47:31 2018 +0000
@@ -26,6 +26,8 @@
 
 $(srcdir)/config/aarch64/aarch64-tune.md: $(srcdir)/config/aarch64/gentune.sh \
        $(srcdir)/config/aarch64/aarch64-cores.def
+       @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_aarch64-tune.md:
        $(SHELL) $(srcdir)/config/aarch64/gentune.sh \
                $(srcdir)/config/aarch64/aarch64-cores.def > \
                $(srcdir)/config/aarch64/aarch64-tune.md
diff -r 6f2abf5acb70 -r a5dce68d474f external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd        Sat Jul 14 23:47:31 2018 +0000
@@ -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
diff -r 6f2abf5acb70 -r a5dce68d474f external/gpl3/gcc/dist/libgcc/config.host
--- a/external/gpl3/gcc/dist/libgcc/config.host Sat Jul 14 23:42:23 2018 +0000
+++ b/external/gpl3/gcc/dist/libgcc/config.host Sat Jul 14 23:47:31 2018 +0000
@@ -344,6 +344,11 @@
        tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
        tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
        ;;
+aarch64*-*-netbsd*)
+       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
diff -r 6f2abf5acb70 -r a5dce68d474f external/gpl3/gcc/lib/libbacktrace/arch/aarch64/backtrace-supported.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/libbacktrace/arch/aarch64/backtrace-supported.h     Sat Jul 14 23:47:31 2018 +0000
@@ -0,0 +1,70 @@
+/* This file is automatically generated.  DO NOT EDIT! */
+/* Generated from: NetBSD: mknative-gcc,v 1.92 2018/02/06 07:04:01 mrg Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
+
+/* backtrace-supported.h.in -- Whether stack backtrace is supported.
+   Copyright (C) 2012-2016 Free Software Foundation, Inc.
+   Written by Ian Lance Taylor, Google.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    (1) Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer. 
+
+    (2) Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.  
+    
+    (3) The name of the author may not be used to
+    endorse or promote products derived from this software without
+    specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.  */
+
+/* The file backtrace-supported.h.in is used by configure to generate
+   the file backtrace-supported.h.  The file backtrace-supported.h may
+   be #include'd to see whether the backtrace library will be able to
+   get a backtrace and produce symbolic information.  */
+
+
+/* BACKTRACE_SUPPORTED will be #define'd as 1 if the backtrace library
+   should work, 0 if it will not.  Libraries may #include this to make
+   other arrangements.  */
+
+#define BACKTRACE_SUPPORTED 1
+
+/* BACKTRACE_USES_MALLOC will be #define'd as 1 if the backtrace
+   library will call malloc as it works, 0 if it will call mmap
+   instead.  This may be used to determine whether it is safe to call
+   the backtrace functions from a signal handler.  In general this
+   only applies to calls like backtrace and backtrace_pcinfo.  It does
+   not apply to backtrace_simple, which never calls malloc.  It does
+   not apply to backtrace_print, which always calls fprintf and
+   therefore malloc.  */
+
+#define BACKTRACE_USES_MALLOC 0
+
+/* BACKTRACE_SUPPORTS_THREADS will be #define'd as 1 if the backtrace
+   library is configured with threading support, 0 if not.  If this is
+   0, the threaded parameter to backtrace_create_state must be passed
+   as 0.  */
+
+#define BACKTRACE_SUPPORTS_THREADS 1
+
+/* BACKTRACE_SUPPORTS_DATA will be #defined'd as 1 if the backtrace_syminfo
+   will work for variables.  It will always work for functions.  */
+
+#define BACKTRACE_SUPPORTS_DATA 1
diff -r 6f2abf5acb70 -r a5dce68d474f external/gpl3/gcc/lib/libbacktrace/arch/aarch64/config.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/libbacktrace/arch/aarch64/config.h  Sat Jul 14 23:47:31 2018 +0000
@@ -0,0 +1,139 @@
+/* This file is automatically generated.  DO NOT EDIT! */
+/* Generated from: NetBSD: mknative-gcc,v 1.92 2018/02/06 07:04:01 mrg Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
+
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* ELF size: 32 or 64 */
+#define BACKTRACE_ELF_SIZE 64
+
+/* Define to 1 if you have the __atomic functions */
+#define HAVE_ATOMIC_FUNCTIONS 1
+
+/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
+   don't. */
+#define HAVE_DECL_STRNLEN 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define if dl_iterate_phdr is available. */
+#define HAVE_DL_ITERATE_PHDR 1
+
+/* Define to 1 if you have the fcntl function */
+#define HAVE_FCNTL 1
+
+/* Define if getexecname is available. */
+/* #undef HAVE_GETEXECNAME */
+
+/* Define if _Unwind_GetIPInfo is available. */
+#define HAVE_GETIPINFO 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <link.h> header file. */
+#define HAVE_LINK_H 1
+



Home | Main Index | Thread Index | Old Index