This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH] Use correct ARM architecture profile for optimized ARMv6t2/v7 memchr version.
- From: Pavel Pisa <ppisa4lists at pikron dot com>
- To: Richard Earnshaw <rearnsha at arm dot com>, "newlib at sourceware dot org" <newlib at sourceware dot org>
- Cc: Nicholas Clifton <nickc at redhat dot com>, Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Date: Sun, 6 Jul 2014 17:30:35 +0200
- Subject: [PATCH] Use correct ARM architecture profile for optimized ARMv6t2/v7 memchr version.
- Authentication-results: sourceware.org; auth=none
- References: <201407030216 dot 43438 dot ppisa4lists at pikron dot com> <53B549E1 dot 1020207 at redhat dot com> <53B55151 dot 1050104 at arm dot com>
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"