I am using VxWorks 6.2 and GNU Compiler 3.3.2
I have ported the BSP from VxWorks 5.5 and GNU Compiler 2.96.

I am using a MIPS 4KEC processor on target machine.

When I assemble my file sysAlib.s, it gives me an error
Error: opcode not supported on this processor: mips2 (mips2) `cache

so to resolve this I have edited the file

It contains a couple of lines -
CC_ARCH_SPEC += -mips2
AS += -mips2

which I have changed to -

CC_ARCH_SPEC += -march=4kc
AS += -march=4kc

And this works for me.
But this might not be a perfect solution.

Can anybody please let me know, what is the correct way of doing this?