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]

Remaining arch issue in Newlib optimized ARM ASM memchr for Cortex-R


Hello everybody,

we have stubled on next problem with GCC-4.9.0 and Newlib-2.1 when linking
RTEMS 4.11 code (but issue is generic for Newlib use for each Cortex-R
optimized multilib on any OS)

COLLECT_GCC_OPTIONS='-v' '-qrtems' '-B'  
'../tms570ls3137_hdk_sdram/lib/' '-specs=bsp_specs'  
'-march=armv7-r' '-mthumb' '-mbig-endian' '-O2' '-ggdb3' '-D' 'NDEBUG'  
'-Wall' '-Wmissing-prototypes' '-Wimplicit-function-declaration'  
'-Wstrict-prototypes' '-Wnested-externs' '-march=armv7-r' '-mthumb'  
'-mbig-endian' '-o' 'capture.exe'
   
/usr/arm-rtems4.11/gcc/4.9.0/bin/../libexec/gcc/arm-rtems4.11/4.9.0/collect2  
-dc -dp -N -EB -o capture.exe  
../tms570ls3137_hdk_sdram/lib/start.o  
.../thumb/armv7-r/eb/crti.o .../thumb/armv7-r/eb/crtbegin.o -e 
_start -L.../thumb/armv7-r/eb -L.../arm-rtems4.11/lib/thumb/armv7-r/eb -L../tms570ls3137_hdk_sdram/lib -L... -L/usr/arm-rtems4.11/gcc/4.9.0/bin/../lib/gcc -L.../arm-rtems4.11/lib 
init.o 
test1.o --start-group -lgcc --start-group -lrtemsbsp -lrtemscpu -lc -lgcc --end-group -T ../tms570ls3137_hdk_sdram/lib/linkcmds --end-group .../thumb/armv7-r/eb/crtend.o  
.../thumb/armv7-r/eb/crtn.o
.../arm-rtems4.11/bin/ld: error: .../arm-rtems4.11/lib/thumb/armv7-r/eb/libc.a(lib_a-memchr.o): Conflicting architecture profiles A/R
.../arm-rtems4.11/bin/ld: failed to merge target 

Most of the paths shortened - prefixes replaced by "...".

I have checked even current GIT Newlib sources and problem seems
to be present there as well.

One way to correct the problem is attached simple change.
Other option is to remove .arch line altogether and trust
correct options used when memchr.S build is invoked.

Proposed patch checked by readelf on
  eb/thumb/armv7-r/newlib/libc/string/lib_a-memrchr.o
and
  thumb/armv7-a/newlib/libc/string/lib_a-memrchr.o
Check of RTEMS build by new toolchain (Sebastian thanks),
is expected on Friday.

Best wishes,

             Pavel

---
 newlib/libc/machine/arm/memchr.S |    4 ++++
 1 file changed, 4 insertions(+)

Index: newlib-2.1/newlib/libc/machine/arm/memchr.S
===================================================================
--- newlib-2.1.orig/newlib/libc/machine/arm/memchr.S    2011-10-18 13:35:17.000000000 +0200
+++ newlib-2.1/newlib/libc/machine/arm/memchr.S 2014-07-03 00:38:47.598049234 +0200
@@ -46,7 +46,11 @@
 @    tidy

        .syntax unified
+#ifdef __ARM_ARCH_7R__
+       .arch armv7-r
+#else
        .arch armv7-a
+#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]