From 714ff98b882f4edeec64ce6fd19b4528bf4726c0 Mon Sep 17 00:00:00 2001
From: mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 20 Aug 2004 20:15:19 +0000
Subject: [PATCH] 	* config.gcc (arm*-*-symbianelf*): Add t-symbian
 Makefile 	fragment. 	* config/arm/bpabi.h (RENAME_LIBRARY_SET): Fix
 typo. 	(SUBTARGET_EXTRA_ASM_SPEC): Pass -meabi=3 to the assembler. 	*
 config/arm/symbian.h (SUBTARGET_CPU_DEFAULT): Assume ARMV5 	architecture. 
 (SUBTARGET_ASM_FLOAT_SPEC): Default to -mfpu=vfp for hard-float 
 configurations. 	* config/arm/t-symbian: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86338 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/config.gcc           |  3 ++-
 gcc/config/arm/bpabi.h   |  6 +++++-
 gcc/config/arm/symbian.h | 13 +++++++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index b9023243acd7..0eacb5d8bf8c 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -658,13 +658,14 @@ arm*-*-eabi* | arm*-*-symbianelf* )
 	# TImode.
 	need_64bit_hwint=yes
 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
+	tmake_file="t-slibgcc-elf-ver arm/t-arm arm/t-arm-elf arm/t-bpabi"
 	case ${target} in
 	arm*-*-symbianelf*)
 	  tm_file="${tm_file} arm/symbian.h"
+	  tmake_file="${tmake_file} arm/t-symbian"
 	  ;;
 	esac
 	tm_file="${tm_file} arm/aout.h arm/arm.h"
-	tmake_file="t-slibgcc-elf-ver arm/t-arm arm/t-arm-elf arm/t-bpabi"
 	;;
 arm*-*-rtems*)
 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h
index 815ac306ec56..4831dfb61bc5 100644
--- a/gcc/config/arm/bpabi.h
+++ b/gcc/config/arm/bpabi.h
@@ -36,13 +36,17 @@
 /* The BPABI integer comparision routines return { -1, 0, 1 }.  */
 #define TARGET_LIB_INT_CMP_BIASED !TARGET_BPABI
 
+/* Tell the assembler to build BPABI binaries.  */
+#undef SUBTARGET_EXTRA_ASM_SPEC
+#define SUBTARGET_EXTRA_ASM_SPEC "-meabi=3"
+
 /* The generic link spec in elf.h does not support shared libraries.  */
 #undef LINK_SPEC
 #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} "		\
   "%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} "	\
   "-X"
 
-#if defined (__thumb__) && !defined (__THUMB_INTERWORD) 
+#if defined (__thumb__) && !defined (__THUMB_INTERWORK) 
 #define RENAME_LIBRARY_SET ".thumb_set"
 #else
 #define RENAME_LIBRARY_SET ".set"
diff --git a/gcc/config/arm/symbian.h b/gcc/config/arm/symbian.h
index bd647d39f0ce..d048652fe01b 100644
--- a/gcc/config/arm/symbian.h
+++ b/gcc/config/arm/symbian.h
@@ -52,3 +52,16 @@
 
 /* Support the "dllimport" attribute.  */
 #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 1
+
+/* Symbian OS assumes ARM V5 or above.  Since -march=armv5 is
+   equivalent to making the ARM 10TDMI core the default, we can set
+   SUBTARGET_CPU_DEFAULT and get an equivalent effect.  */
+#undef SUBTARGET_CPU_DEFAULT
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+
+/* The assembler should assume the VFP FPU format when the hard-float
+   ABI is in use.  */
+#undef SUBTARGET_ASM_FLOAT_SPEC
+#define SUBTARGET_ASM_FLOAT_SPEC \
+  "%{!mfpu=*:%{mfloat-abi=hard:-mfpu=vfp}}"
+  
-- 
GitLab