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] Use correct ARM architecture profile for optimized ARMv6t2/v7 memchr version.


On 06/07/14 16:30, Pavel Pisa wrote:
> 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.
> 

No, please don't do it this way.  It will give the surprising result for
ARMv8-a (or later) of going backwards to v6t2.

You only need object file attributes to be compatible with your existing
code.   armv6t2 will be enough for that; so why are you trying to
overcomplicate this?

R.

> --
> 
> 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"
>  
> 



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