Cross Compiler question (the essence of a Canadian Cross Compiler)
Lennert Buytenhek
buytenh@wantstofly.org
Fri Aug 5 14:02:00 GMT 2005
On Fri, Aug 05, 2005 at 08:46:06AM -0500, J. Robert Wyatt wrote:
> Now this is weird .... I've tried hello world now with the compiler that
> runs on the build machine to generate for the target and I'm getting messed
> up const char * assignments.
>
> The hello world is:
>
> #include <stdio.h>
>
> int main() {
> const char *foo = "armv5b-softfloat-linux-gnu";
> const char *foo1 = "armv5b-x-linux-gnu";
> fprintf(stderr,"foo =[%s]\n",foo);
> fprintf(stderr,"foo1=[%s]\n",foo1);
> }
>
>
> And the output on the target machine is:
>
> /opt/crosstool # ./a.out
> foo =[armv5b-softfloat-linux-g]
> foo1=[armv5b-x-linux-g]
Big endian ARM hardware, hm? You'll need to patch your glibc's
implementation of strlen() so that it works properly on big-endian
ARM platforms. While you're at it, you'll also need to patch glibc
so that it uses proper byte/word ordering for doubles. There are
patches for this in crosstool but most likely not in the patches
directory for glibc 2.2.5 -- try having a look at what patches
crosstool carries for glibc 2.3.2 or 2.3.3.
(Why don't you use a precompiled distro, anyway?)
cheers,
Lennert
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list