Module Name:    src
Committed By:   matt
Date:           Sun Aug  5 04:10:18 UTC 2012

Modified Files:
        src/external/gpl3/gcc/dist: config.sub
        src/external/gpl3/gcc/dist/gcc: config.gcc
        src/external/gpl3/gcc/dist/gcc/config/arm: bpabi.h netbsd-elf.h
Added Files:
        src/external/gpl3/gcc/dist/gcc/config/arm: netbsd-eabi.h t-netbsd-eabi

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


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/config.sub
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/gcc/config.gcc
cvs rdiff -u -r1.1.1.1 -r1.2 \
    src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h \
    src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h
cvs rdiff -u -r0 -r1.1 \
    src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h \
    src/external/gpl3/gcc/dist/gcc/config/arm/t-netbsd-eabi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/config.sub
diff -u src/external/gpl3/gcc/dist/config.sub:1.1.1.1 src/external/gpl3/gcc/dist/config.sub:1.2
--- src/external/gpl3/gcc/dist/config.sub:1.1.1.1	Tue Jun 21 01:19:48 2011
+++ src/external/gpl3/gcc/dist/config.sub	Sun Aug  5 04:10:18 2012
@@ -125,7 +125,8 @@ esac
 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

Index: src/external/gpl3/gcc/dist/gcc/config.gcc
diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.11 src/external/gpl3/gcc/dist/gcc/config.gcc:1.12
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.11	Thu Dec 15 08:34:11 2011
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Sun Aug  5 04:10:18 2012
@@ -722,11 +722,28 @@ arm*-*-freebsd*)
 	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"

Index: src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.1.1.1 src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.2
--- src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.1.1.1	Tue Jun 21 01:22:19 2011
+++ src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h	Sun Aug  5 04:10:18 2012
@@ -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.  */
Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.1.1.1 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.2
--- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h:1.1.1.1	Tue Jun 21 01:22:19 2011
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h	Sun Aug  5 04:10:18 2012
@@ -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

Added files:

Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h
diff -u /dev/null src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.1
--- /dev/null	Sun Aug  5 04:10:19 2012
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h	Sun Aug  5 04:10:18 2012
@@ -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)"
Index: src/external/gpl3/gcc/dist/gcc/config/arm/t-netbsd-eabi
diff -u /dev/null src/external/gpl3/gcc/dist/gcc/config/arm/t-netbsd-eabi:1.1
--- /dev/null	Sun Aug  5 04:10:19 2012
+++ src/external/gpl3/gcc/dist/gcc/config/arm/t-netbsd-eabi	Sun Aug  5 04:10:18 2012
@@ -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

Reply via email to