RFA: Build ARM eabi objects by default

Daniel Jacobowitz drow@false.org
Wed Mar 16 17:34:00 GMT 2005


A customer of ours noticed that invoking arm-eabi-as generates binaries that
aren't marked as EABI ver4.  It makes sense to me to try to get the default
options right, if we're being invoked by hand instead of by gcc.

Is this patch OK?  Tested by running the gas testsuite on arm-elf,
arm-linuxeabi, and arm-eabi; and by inspecting the default object flags on
each of those platforms.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

2005-03-16  Daniel Jacobowitz  <dan@codesourcery.com>

	* configure.tgt: Set emulation for arm-*-eabi*.
	* config/tc-arm.c (meabi_flags): Check EABI_DEFAULT.
	* config/te-armeabi.h: New file.
	* config/te-armlinuxeabi.h (EABI_DEFAULT): Define.
	* config/te-symbian.h: Include "te-armeabi.h".

Index: configure.tgt
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gas/configure.tgt,v
retrieving revision 1.3
diff -u -p -r1.3 configure.tgt
--- configure.tgt	31 Jan 2005 17:18:51 -0000	1.3
+++ configure.tgt	16 Mar 2005 15:48:37 -0000
@@ -110,12 +110,12 @@ case ${generic_target} in
   arm-*-coff | thumb-*-coff)		fmt=coff ;;
   arm-*-rtems* | thumb-*-rtems*)	fmt=elf ;;
   arm-*-elf | thumb-*-elf)		fmt=elf ;;
-  arm-*-eabi*)				fmt=elf ;;
+  arm-*-eabi*)				fmt=elf em=armeabi ;;
   arm-*-symbianelf*)			fmt=elf em=symbian ;;
   arm-*-kaos*)				fmt=elf ;;
   arm-*-conix*)				fmt=elf ;;
   arm-*-linux*aout*)			fmt=aout em=linux ;;
-  arm-*-linux-gnueabi*)			fmt=elf  em=armlinuxeabi ;;	 
+  arm-*-linux-gnueabi*)			fmt=elf  em=armlinuxeabi ;;
   arm-*-linux-gnu*)			fmt=elf  em=linux ;;
   arm-*-uclinux*)			fmt=elf  em=linux ;;
   arm-*-netbsdelf*)                 	fmt=elf  em=nbsd ;;
Index: config/tc-arm.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gas/config/tc-arm.c,v
retrieving revision 1.193
diff -u -p -r1.193 tc-arm.c
--- config/tc-arm.c	23 Feb 2005 12:28:03 -0000	1.193
+++ config/tc-arm.c	16 Mar 2005 15:40:20 -0000
@@ -159,7 +159,11 @@ static int march_fpu_opt = -1;
 static int mfpu_opt = -1;
 static int mfloat_abi_opt = -1;
 #ifdef OBJ_ELF
+# ifdef EABI_DEFAULT
+static int meabi_flags = EABI_DEFAULT;
+# else
 static int meabi_flags = EF_ARM_EABI_UNKNOWN;
+# endif
 #endif
 
 /* This array holds the chars that always start a comment.  If the
Index: config/te-armeabi.h
===================================================================
RCS file: config/te-armeabi.h
diff -N config/te-armeabi.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config/te-armeabi.h	16 Mar 2005 15:46:34 -0000
@@ -0,0 +1,8 @@
+/* The EABI requires the use of VFP.  */
+#define FPU_DEFAULT FPU_ARCH_VFP_V2
+#define EABI_DEFAULT EF_ARM_EABI_VER4
+
+#define LOCAL_LABELS_DOLLAR 1
+#define LOCAL_LABELS_FB 1
+
+#include "obj-format.h"
Index: config/te-armlinuxeabi.h
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gas/config/te-armlinuxeabi.h,v
retrieving revision 1.1
diff -u -p -r1.1 te-armlinuxeabi.h
--- config/te-armlinuxeabi.h	3 Dec 2004 01:22:15 -0000	1.1
+++ config/te-armlinuxeabi.h	16 Mar 2005 15:46:28 -0000
@@ -2,3 +2,4 @@
 
 /* The EABI requires the use of VFP.  */
 #define FPU_DEFAULT FPU_ARCH_VFP_V2
+#define EABI_DEFAULT EF_ARM_EABI_VER4
Index: config/te-symbian.h
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gas/config/te-symbian.h,v
retrieving revision 1.1
diff -u -p -r1.1 te-symbian.h
--- config/te-symbian.h	3 Sep 2004 17:15:42 -0000	1.1
+++ config/te-symbian.h	16 Mar 2005 15:48:02 -0000
@@ -1,3 +1,3 @@
 #define TE_SYMBIAN 1
-#include "obj-elf.h"
 
+#include "te-armeabi.h"



More information about the Binutils mailing list