This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Build for ARMv4 archicture


Richard Earnshaw wrote:
On Mon, 2006-10-02 at 21:03, Jeff Johnston wrote:

Hello Ray,

Thanks for noting this problem.

 I talked to Nick Clifton about this and he prepared an alternate
patch that tests if the ARM architecture supports the insn.  His patch
has just been checked in to the sources.  Please try it out.



Except that that patch doesn't work because __ARM_ARCH__ isn't
pre-defined by the compiler and isn't defined anywhere in the source
(it's an invention used in gcc's libgcc support code).

It would be easier these days to test for the architectures that don't
have BX: Essentially that's __ARM_ARCH_2__, __ARM_ARCH_3__,
__ARM_ARCH_3M__ and __ARM_ARCH_4__.

Note: testing __thumb__ is completely wrong.

R.


I have attached a new patch based on your suggestion. Ok or are there any other issues?


-- Jeff J.
Index: linux-syscalls0.S
===================================================================
RCS file: /cvs/src/src/libgloss/arm/linux-syscalls0.S,v
retrieving revision 1.4
diff -u -p -r1.4 linux-syscalls0.S
--- linux-syscalls0.S	2 Oct 2006 19:57:46 -0000	1.4
+++ linux-syscalls0.S	3 Oct 2006 16:19:48 -0000
@@ -203,10 +203,11 @@ FUNC(_socketcall_tail)
 	bl _socketcall
 	pop { r3 }
 	add sp, #16
-#if (__ARM_ARCH__ > 4) || defined(__ARM_ARCH_4T__)
-	bx r3
-#else
+#if defined(__ARM_ARCH_2__) || defined(__ARM_ARCH_3__) \
+    || defined(__ARM_ARCH_3M__) || defined(__ARM_ARCH_4__)
 	mov pc, r3
+#else
+	bx r3
 #endif
 	SIZE(_socketcall_tail)
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]