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

Andrew Stubbs ams at codesourcery.com
Tue May 3 09:33:09 UTC 2011


On 29/04/11 08:47, Prasanta Sadhukhan wrote:
>     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.
>
> Thanks for the information. However, when I tried Sourcery G++ Lite
> 4.4-200 and compiled the program with
> -m4-nofpu
> I am still getting "Illegal instruction". [also tried with the above
> options]

Sorry, I should have been clearer, the 4.4-200 release does not support 
-m4-nofpu, but it does support -m4al which is essentially the same thing.

If you build with -m4-nofpu it will still link the default libraries 
(i.e. -m4a) because it is not smart enough to figure out that it has a 
better option. The result is the illegal instructions you're seeing.

Please try again with -m4al instead of -m4-nofpu.

> I guess -m4-nofpu generated code will still not run in SH7712 sh3
> architecture, am I right?

This may be true; I have not confirmed it. However, I do not believe 
-m4-nofpu supports any instructions that -m3 does not.

> Can any of this lite toolchain in
> http://www.codesourcery.com/sgpp/lite/superh/portal/subscription6790
> generate code that will run in SH7712 sh3 chipset?

No, there are no CodeSourcery toolchains that target SH-3. We currently 
support SH-4A Linux, SH4AL-DSP Linux, and SH-2A FDPIC uClinux only.

As I said, if you would like CodeSourcery toolchains to support SH3, 
please contact sales at codesourcery.com.

Andrew



More information about the superh-gnu-discuss mailing list