Hello all, After a lot of testing I found that I needed to "reset" the target (sb-conf reset) in order to fix this. I don't have a clue why this is needed and why the -march setting was being ignored without this, but at least it is now solved.
Just in case someone else is having the same problem. Guillermo Rodriguez Garcia guille.rodrig...@gmail.com El 14/12/2011 17:22, Guillermo Rodriguez Garcia escribió: > Hello Jussi, > > Thanks for your prompt answer. Something seems to be wrong, though: > >>> I am trying to use scratchbox to compile code for an armv4t target. >>> However the available ARM toolchains seem to be ignoring the -march >>> option, hence generating code that will not run on the target device. >>> >>> I have installed the latest hathor scratchbox packages available and >>> have tested both the cs2009 and the cs2010 toolchains, same result. >>> >>> This is the output of sb-conf show: >>> >>> [sbox-mydev: ~] > sb-conf show >>> Compiler: arm-linux-cs2010q1-202 >> >> That particular compiler is Codesourcery's 2010q1, which is configured >> with --with-arch=armv5te so the default is march=armv5te. >> >> However, that particular toolchain has a support for armv4t also. For me >> the following works: >> >> [sbox-test: ~] > sb-conf sh -c >> arm-linux-cs2010q1-202 >> [sbox-test: ~] > rm -f a.out ; gcc /scratchbox/packages/hello.c >> [sbox-test: ~] > readelf -A a.out | head -n 4 >> Attribute Section: aeabi >> File Attributes >> Tag_CPU_name: "5TE" >> Tag_CPU_arch: v5TE >> [sbox-test: ~] > rm -f a.out ; gcc /scratchbox/packages/hello.c >> [sbox-test: ~] > rm -f a.out ; gcc -march=armv4t >> /scratchbox/packages/hello.c >> [sbox-test: ~] > readelf -A a.out | head -n 4 >> Attribute Section: aeabi >> File Attributes >> Tag_CPU_name: "4T" >> Tag_CPU_arch: v4T >> >> The cs2009q3 toolchain is not a multilib one and it defaults to armv7-a, >> so above is not likely to work with it. > > I tried to reproduce the above using exactly the same commands: > > [sbox-mydev: ~] > sb-conf sh -c > arm-linux-cs2010q1-202 > [sbox-mydev: ~] > rm -f a.out ; gcc /scratchbox/packages/hello.c > [sbox-mydev: ~] > readelf -A a.out | head -n 4 > Attribute Section: aeabi > File Attributes > Tag_CPU_name: "5TE" > Tag_CPU_arch: v5TE > [sbox-mydev: ~] > rm -f a.out ; gcc -march=armv4t /scratchbox/packages/hello.c > [sbox-mydev: ~] > readelf -A a.out | head -n 4 > Attribute Section: aeabi > File Attributes > Tag_CPU_name: "5TE" > Tag_CPU_arch: v5TE > > Obviously there must be something wrong, but I don't have a clue what > it is. Any hints on where to look?? > > Thanks, > > Guillermo Rodriguez Garcia > guille.rodrig...@gmail.com > _______________________________________________ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users