Fwd: arm[eb]-eabi-gcc for cortex-r4[f] with newlib has problems with multilib/libraries.
Thu Jul 4 21:25:00 GMT 2013
Given my problem in the e-mail below, which nobody in crossgcc seems to
get any idea about it so far, I was wondering if it could have something
to do with newlib itself. The problem looks like the newlib strlen gets
compiled for the armv7-a architecture, regardless of specifying both the
cortex-r4[f] cpu, and the armv7-r architecture as defaults when building
There is a proposed patch for newlib that made me suspect that the
armv7-a might be hard-coded somehow in the strlen implementation:
What do you guys think?
Please let me know if you need any additional details as how did I built
the compiler, as I've done it both ways, manually as well as using
crosstool-ng, trying to find any problem in the way I was doing it.
P.S. As the mailing list does not accept too long messges, I've removed
the crosstool-ng build log, which can be found in the crossgcc mailing
list message: http://sourceware.org/ml/crossgcc/2013-06/msg00017.html
The configuration information from the compiler is:
$ arm-eabi-gcc -v
Using built-in specs.
Configured with: /home/davidfc/src/gcc-4.8.1/configure
--target=arm-eabi --enable-languages=c,c++ --with-gnu-as --with-gnu-ld
--with-arch=armv7-r --with-cpu=cortex-r4f --with-mode=thumb
--with-abi=aapcs --with-float-abi=hard --with-fpu=vfpv3-d16 -v
Thread model: single
gcc version 4.8.1 (GCC)
-------- Original Message --------
Subject: arm[eb]-eabi-gcc for cortex-r4[f] with newlib has problems
Date: Sat, 15 Jun 2013 01:05:38 +0100
From: David Fernandez <firstname.lastname@example.org>
To: email@example.com <firstname.lastname@example.org>
I've built an arm[eb]-eabi-gcc for --with-cpu=cortex-r4[f]
--with-mode=thumb --with-newlib, both manually and with crosstool-ng. In
all cases, I get a strange problem when building a main function with
ful C runtime library support like this (include the latest version, but
it happens with the little endian, and with the cortex-r4 too):
$ armeb-eabi-gcc -mbig-endian -mthumb -march=armv7-r -mcpu=cortex-r4f -o
Conflicting architecture profiles A/R
failed to merge target specific data of file
collect2: error: ld returned 1 exit status
I'm pretty sure that when I built this same kind of compiler for a
cortex-m3, it did not do this.
Anyway, find attached the alignpack.c, and the crosstool-ng log. I had
to use newlib-2.0.0 to make it work with the tuple armeb-xxx.
I've tried additional multilib permutations, but the errors keep appearing.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 548 bytes
Desc: not available
More information about the Newlib