This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH v2] Use correct ARM architecture profile for optimized ARMv6t2/v7 memchr version.
- From: Pavel Pisa <ppisa4lists at pikron dot com>
- To: newlib at sourceware dot org
- Cc: Richard Earnshaw <rearnsha at arm dot com>, "nickc at redhat dot com" <nickc at redhat dot com>, Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Date: Mon, 7 Jul 2014 15:47:06 +0200
- Subject: [PATCH v2] 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> <201407071519 dot 01065 dot ppisa4lists at pikron dot com> <53BAA04C dot 8050803 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
Use solution proposed by Richard Earnshaw.
".arch armv6t2" defines null profile which should be
be upward compatible with all targets using optimized
version.
--
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 9f4b568..d55f197 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,9 @@
+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. Problem solution proposed
+ by Richard Earnshaw.
+
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..0c066ea 100644
--- a/newlib/libc/machine/arm/memchr.S
+++ b/newlib/libc/machine/arm/memchr.S
@@ -46,7 +46,13 @@
@ tidy
.syntax unified
- .arch armv7-a
+
+@ Select architecture to ARMv6T2 which is expected to be
+@ upward compatible with both v7A and v7R profiles
+@ and catches possible armv6t2 incompatible instruction
+@ leak into assembly code
+
+ .arch armv6t2
#include "arm_asm.h"