This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ARM libgcc build fix for interworking
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 14 Jan 2004 15:13:31 -0500
- Subject: ARM libgcc build fix for interworking
I turned on a -mthumb-interwork multilib for arm-elf, and libgcc didn't
build. The problem is that for the __thumb__ && __THUMB_INTERWORK__ case,
we use FUNC_START for the beginning of some ARM functions in ieee754-df.S.
That includes .thumb_func and .force_thumb, which is obviously wrong. We
want to avoid the manual interworking stub if interworking is available, but
we also need a .arm directive to override the assembler's command-line
-mthumb.
Is this OK? Disclaimer: I tested a similar patch but not precisely this
one. I will retest it later today.
[The whitespace change on line 180 removes trailing whitespace.]
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-01-14 Daniel Jacobowitz <drow@mvista.com>
* config/arm/lib1funcs.asm (ARM_FUNC_START): Define differently
for __thumb__ && __THUMB_INTERWORK__.
Index: lib1funcs.asm
===================================================================
RCS file: /big/fsf/rsync/gcc-cvs/gcc/gcc/config/arm/lib1funcs.asm,v
retrieving revision 1.26
diff -u -p -r1.26 lib1funcs.asm
--- lib1funcs.asm 30 Sep 2003 10:30:32 -0000 1.26
+++ lib1funcs.asm 14 Jan 2004 20:08:31 -0000
@@ -180,7 +180,7 @@ SYM (\name):
#define THUMB_FUNC
#define THUMB_CODE
#endif
-
+
.macro FUNC_START name
.text
.globl SYM (__\name)
@@ -194,7 +194,8 @@ SYM (__\name):
/* Special function that will always be coded in ARM assembly, even if
in Thumb-only compilation. */
-#if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
+#if defined(__thumb__)
+#if !defined(__THUMB_INTERWORK__)
.macro ARM_FUNC_START name
FUNC_START \name
bx pc
@@ -202,6 +203,16 @@ SYM (__\name):
.arm
_L__\name: /* A hook to tell gdb that we've switched to ARM */
.endm
+#else
+.macro ARM_FUNC_START name
+ .text
+ .globl SYM (__\name)
+ TYPE (__\name)
+ .align 0
+ .arm
+SYM (__\name):
+.endm
+#endif
#else
.macro ARM_FUNC_START name
FUNC_START \name