This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFA] PR9861 FAIL: EABI attributes from directives
- From: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- To: binutils at sourceware dot org
- Date: Fri, 19 Feb 2010 14:20:45 +0000
- Subject: [RFA] PR9861 FAIL: EABI attributes from directives
Hi,
The attached patch fixes PR9861
(http://sourceware.org/bugzilla/show_bug.cgi?id=9861).
The issue is that the default CPU to assembler for (defined by
CPU_DEFAULT) is dependent upon the compiler used to build gas. And so
arm-unknown-linux-gnueabi-as will produce different results depending
upon whether it is built on an x86_64 or an ARM machine (say).
The proposed patch removed any definition of CPU_DEFAULT based upon
build compiler predefines.
I have tested this with the cross-product of
(--target=arm-unknown-linux-gnueabi, --target=arm-none-eabi) and
(--build=x86_64-unknown-linux-gnu, --build=armv7-unknown-linux-gnueabi).
Can someone please review, and then if happy approve the patch?
Proposed ChangeLog:
2010-02-19 Matthew-Gretton-Dann <matthew.gretton-dann@arm.com>
PR 9861
* config/tc-arm.c (CPU_DEFAULT): Do not define based upon
build compiler's predefines.
Thanks,
Matt
--
Matthew Gretton-Dann
Principal Engineer - Tools, PD Software
ARM Limited
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.431
diff -u -p -r1.431 tc-arm.c
--- gas/config/tc-arm.c 18 Feb 2010 10:56:27 -0000 1.431
+++ gas/config/tc-arm.c 18 Feb 2010 17:30:19 -0000
@@ -97,13 +97,12 @@ enum arm_float_abi
/* Types of processor to assemble for. */
#ifndef CPU_DEFAULT
-#if defined __XSCALE__
-#define CPU_DEFAULT ARM_ARCH_XSCALE
-#else
-#if defined __thumb__
-#define CPU_DEFAULT ARM_ARCH_V5T
-#endif
-#endif
+/* The code that was here used to select a default CPU depending on compiler
+ pre-defines which were only present when doing native builds, thus
+ changing gas' default behaviour depending upon the build host.
+
+ If you have a target that requires a default CPU option then the you
+ should define CPU_DEFAULT here. */
#endif
#ifndef FPU_DEFAULT