MATLAB: Do I get the warning “-xarch=v9a is deprecated, use -m64 -xarch=sparcvis instead” when compiling on Solaris using MATLAB Compiler 4.9 (R2008b)

MATLAB Compiler

When I try to compile a simple application, I get the following warning messages:
cc: Warning: -xarch=v9a is deprecated, use -m64 -xarch=sparcvis instead
I am using Sun Studio 12 cc/CC 5.9:
$ cc -V
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12

Best Answer

You are getting the warning messages because MATLAB Compiler sets the mentioned compiler options which are needed for compatibility with SunStudio 11 (CC 5.8). These options were replaced in SunStudio 12 (CC 5.9) but they are still understood by both the compilers. As the new options are not backwards compatible, MATLAB still has to use the old ones.
Note that the same also applies to other products that might need a compiler, such as Simulink and the Real-Time Workshop.