[superh-gnu-discuss] gcc flag: what to add

Andrew Stubbs ams at codesourcery.com
Thu Apr 28 11:15:02 UTC 2011


On 28/04/11 11:35, Prasanta Sadhukhan wrote:
> using sh-linux-gnu-gcc -m3 -Wa,--isa=sh3
>
> but I am getting "Illegal Instruction" for printing "float" value. If I
> remove "float" usage then I can get the program to work

Sorry, the CodeSourcery Lite toolchain currently only supports SH-4A.

The options you mention do allow you to compile your own code for other 
architectures (although we don't test that it produces *good* code for 
them), but there are no corresponding libraries to link against, so you 
still get SH-4A code from there - hence the illegal instructions.

If you revert back to the GCC 4.4 based Lite toolchain [1], you'll find 
that that supported SH4AL-DSP, which is essentially the same as 
-m4-nofpu, so you might get further with that.

The other toolchain editions [2] still support SH4AL-DSP, and come with 
technical support. (You can try them for 30 days, free of charge.)

If you would like CodeSourcery toolchains to support SH3, please contact 
sales at codesourcery.com.

Hope that helps

Andrew

[1] http://www.codesourcery.com/sgpp/lite/superh/portal/subscription6790
[2] http://www.codesourcery.com/sgpp/editions.html



More information about the superh-gnu-discuss mailing list