On 12/14/2011 02:40 PM, Guillermo Rodriguez Garcia wrote:
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.

Regards,

  Jussi
_______________________________________________
Scratchbox-users mailing list
Scratchbox-users@lists.scratchbox.org
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users

Reply via email to