[PATCH] Use correct ARM architecture profile for optimized ARMv6t2/v7 memchr version.

Pavel Pisa ppisa4lists@pikron.com
Sun Jul 6 15:30:00 GMT 2014


This prevents next error at link time for Cortex-R multilib option

Conflicting architecture profiles A/R
.../arm-rtems4.11/bin/ld: failed to merge target

Simple ".arch armv6t2" defines null profile and  can be used
probably for all targets but chosen solution is consistent
with attributes of other libc library objects.

Other option is to eliminate ".arch" line altogether.

--

diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 9f4b568..deee044 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-06  Pavel Pisa  <pisa@cmp.felk.cvut.cz>
+
+	* libc/machine/arm/memchr.S: Use correct ARM architecture profile
+	for ARMv6t2/v7 memchr version.
+
 2014-07-04  Bin Cheng  <bin.cheng@arm.com>
 
 	* README (--enable-newlib-nano-formatted-io): Describe.
diff --git a/newlib/libc/machine/arm/memchr.S b/newlib/libc/machine/arm/memchr.S
index 56bfef0..842ebf1 100644
--- a/newlib/libc/machine/arm/memchr.S
+++ b/newlib/libc/machine/arm/memchr.S
@@ -46,7 +46,13 @@
 @    tidy
 
 	.syntax unified
+#if defined(__ARM_ARCH_7R__)
+	.arch armv7-r
+#elif defined(__ARM_ARCH_7A__)
 	.arch armv7-a
+#else
+	.arch armv6t2
+#endif
 
 #include "arm_asm.h"
 



More information about the Newlib mailing list