Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gcc/dist Add arm{, eb}--netbsdelf-eabi support....



details:   https://anonhg.NetBSD.org/src/rev/6de467fdb8bf
branches:  trunk
changeset: 780738:6de467fdb8bf
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Aug 05 04:10:18 2012 +0000

description:
Add arm{,eb}--netbsdelf-eabi support. (still evolving)

diffstat:

 external/gpl3/gcc/dist/config.sub                   |   3 +-
 external/gpl3/gcc/dist/gcc/config.gcc               |  21 ++++-
 external/gpl3/gcc/dist/gcc/config/arm/bpabi.h       |   2 +
 external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h |  90 +++++++++++++++++++++
 external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h  |   3 +-
 external/gpl3/gcc/dist/gcc/config/arm/t-netbsd-eabi |  28 ++++++
 6 files changed, 143 insertions(+), 4 deletions(-)

diffs (208 lines):

diff -r 1cc95e936e03 -r 6de467fdb8bf external/gpl3/gcc/dist/config.sub
--- a/external/gpl3/gcc/dist/config.sub Sun Aug 05 04:03:39 2012 +0000
+++ b/external/gpl3/gcc/dist/config.sub Sun Aug 05 04:10:18 2012 +0000
@@ -125,7 +125,8 @@
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | \
+  netbsd*-gnu* | netbsd*-eabi* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
diff -r 1cc95e936e03 -r 6de467fdb8bf external/gpl3/gcc/dist/gcc/config.gcc
--- a/external/gpl3/gcc/dist/gcc/config.gcc     Sun Aug 05 04:03:39 2012 +0000
+++ b/external/gpl3/gcc/dist/gcc/config.gcc     Sun Aug 05 04:10:18 2012 +0000
@@ -722,11 +722,28 @@
        tmake_file="${tmake_file} arm/t-arm arm/t-strongarm-elf"
        ;;
 arm*-*-netbsdelf*)
-       tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
-       tmake_file="${tmake_file} arm/t-arm arm/t-netbsd"
+       tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h"
        case ${target} in
        armeb*) tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_END" ;;
        esac
+       tmake_file="${tmake_file} arm/t-arm"
+       case ${target} in
+       arm*-*-netbsdelf-*eabi)
+           tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
+           tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi"
+           tmake_file="$tmake_file arm/t-netbsd-eabi"
+           # The BPABI long long divmod functions return a 128-bit value in
+           # registers r0-r3.  Correctly modeling that requires the use of
+           # TImode.
+           need_64bit_hwint=yes
+           # The EABI requires the use of __cxa_atexit.
+           default_use_cxa_atexit=yes
+           ;;
+       *)
+           tm_file="$tm_file arm/netbsd-elf.h"
+           tmake_file="$tmake_file arm/t-netbsd"
+           ;;
+       esac
        ;;
 arm*-*-netbsd*)
        tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"
diff -r 1cc95e936e03 -r 6de467fdb8bf external/gpl3/gcc/dist/gcc/config/arm/bpabi.h
--- a/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h     Sun Aug 05 04:03:39 2012 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h     Sun Aug 05 04:10:18 2012 +0000
@@ -20,9 +20,11 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Use the AAPCS ABI by default.  */
+#undef ARM_DEFAULT_ABI
 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS
 
 /* Assume that AAPCS ABIs should adhere to the full BPABI.  */ 
+#undef TARGET_BPABI
 #define TARGET_BPABI (TARGET_AAPCS_BASED)
 
 /* BPABI targets use EABI frame unwinding tables.  */
diff -r 1cc95e936e03 -r 6de467fdb8bf external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h       Sun Aug 05 04:10:18 2012 +0000
@@ -0,0 +1,90 @@
+/* Definitions of target machine for GNU compiler, NetBSD/arm ELF version.
+   Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Contributed by Wasabi Systems, 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/>.  */
+
+/* Run-time Target Specification.  */
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (NetBSD/arm ELF EABI)", stderr);
+
+/* Default to armv5t so that thumb shared libraries work.
+   The ARM10TDMI core is the default for armv5t, so set
+   SUBTARGET_CPU_DEFAULT to achieve this.  */
+#undef  SUBTARGET_CPU_DEFAULT
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+
+/* This defaults us to little-endian.  */
+#ifndef TARGET_ENDIAN_DEFAULT
+#define TARGET_ENDIAN_DEFAULT 0
+#endif
+
+/* TARGET_BIG_ENDIAN_DEFAULT is set in
+   config.gcc for big endian configurations.  */
+#undef  TARGET_LINKER_EMULATION
+#if TARGET_ENDIAN_DEFAULT == MASK_BIG
+#define TARGET_LINKER_EMULATION "armelfb_nbsd_eabi"
+#else
+#define TARGET_LINKER_EMULATION "armelf_nbsd_eabi"
+#endif
+
+#undef MULTILIB_DEFAULTS
+
+/* Default it to use ATPCS with soft-VFP.  */
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT                 \
+  (MASK_APCS_FRAME                     \
+   | TARGET_ENDIAN_DEFAULT)
+
+#undef ARM_DEFAULT_ABI
+#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS()       \
+  do                                   \
+    {                                  \
+      TARGET_BPABI_CPP_BUILTINS();     \
+      NETBSD_OS_CPP_BUILTINS_ELF();    \
+    }                                  \
+  while (0)
+
+#undef SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC
+
+#undef SUBTARGET_EXTRA_ASM_SPEC
+#define SUBTARGET_EXTRA_ASM_SPEC       \
+  "-matpcs %{!mabi=*|mabi=aapcs*:-meabi=4} %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
+
+/* Default to full VFP if -mhard-float is specified.  */
+#undef SUBTARGET_ASM_FLOAT_SPEC
+#define SUBTARGET_ASM_FLOAT_SPEC       \
+  "%{mhard-float:{!mfpu=*:-mfpu=vfp}}   \
+   %{mfloat-abi=hard:{!mfpu=*:-mfpu=vfp}}"
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS                          \
+  { "subtarget_extra_asm_spec",        SUBTARGET_EXTRA_ASM_SPEC }, \
+  { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }, \
+  { "netbsd_link_spec",                NETBSD_LINK_SPEC_ELF }, \
+  { "netbsd_entry_point",      NETBSD_ENTRY_POINT },
+
+#define NETBSD_ENTRY_POINT "__start"
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+  "-X %{mbig-endian:-EB} %{mlittle-endian:-EL} \
+   %(netbsd_link_spec)"
diff -r 1cc95e936e03 -r 6de467fdb8bf external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h
--- a/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h        Sun Aug 05 04:03:39 2012 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h        Sun Aug 05 04:10:18 2012 +0000
@@ -40,6 +40,7 @@
 #undef ARM_DEFAULT_ABI
 #define ARM_DEFAULT_ABI ARM_ABI_ATPCS
 
+#undef TARGET_OS_CPP_BUILTINS
 #define TARGET_OS_CPP_BUILTINS()       \
   do                                   \
     {                                  \
@@ -52,7 +53,7 @@
 
 #undef SUBTARGET_EXTRA_ASM_SPEC
 #define SUBTARGET_EXTRA_ASM_SPEC       \
-  "-matpcs %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
+  "-matpcs %{mabi=aapcs*:-meabi=4} %{fpic|fpie:-k} %{fPIC|fPIE:-k}"
 
 /* Default to full VFP if -mhard-float is specified.  */
 #undef SUBTARGET_ASM_FLOAT_SPEC
diff -r 1cc95e936e03 -r 6de467fdb8bf external/gpl3/gcc/dist/gcc/config/arm/t-netbsd-eabi
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/arm/t-netbsd-eabi       Sun Aug 05 04:10:18 2012 +0000
@@ -0,0 +1,28 @@
+# Copyright (C) 2005, 2009 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/>.
+
+# Use a version of div0 which raises SIGFPE, and a special __clear_cache.
+#LIB1ASMFUNCS += \
+#      _ashldi3 _ashrdi3 _divdi3 _floatdidf _udivmoddi4 _umoddi3 \
+#      _udivdi3 _lshrdi3 _moddi3 _muldi3 _negdi2 _cmpdi2 \
+#      _fixdfdi _fixsfdi _fixunsdfdi _fixunssfdi _floatdisf \
+#      _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
+#      _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
+#      _fixsfsi _fixunssfsi
+LIB1ASMFUNCS += \
+       _floatundisf



Home | Main Index | Thread Index | Old Index