Error during making a shared library

Hi all,

I am working with opensolaris and I am trying create a shared native library via using make but I am getting the following error--

make -f /Makefile.SunOS debug
javah -jni SerialPort
javah -jni SerialInputStream
javah -jni SerialOutputStream
gcc -mno-app-regs -DSUN -DPOSIX_DEV_LOCK -I/usr/java/include  -I/usr/java/include/solaris -I/test/as232/Bs232 -I. -g -DENABLE_CC_SHTDN  -c /test/as232/Bs232/lib232so.c
cc1: error: invalid option `no-app-regs'
*** Error code 1
make: Fatal error: Command failed for target `lib232so.o'

ERROR: Buildrs232lib failed!

I am unable to find out the exact cause of error.
So Please take a look on it and help me to fix it.

Thanks in Advance...

Why isnt gcc telling you the exact cause of the error...option "no-app-regs" is invalid. Do man on gcc and see if "no-app-regs" is a supported switch or not.

I check the gcc option "mno-app-regs" and found that it is specific with solaris sparc option.So could you please tell me the appropriate option for opensolaris.

Are you on a Intel or a Sparc platform? What is the output of

gcc -dumpmachine

$ gcc -dumpmachine
sparc-sun-solaris2.9

in another machine--
$ gcc -dumpmachine
i386-pc-solaris2.11

Actually I made the make file which has been used from both(Sparc & x86).
So could anyone tell me what flags I need to used which will work on both platforms.

Thanks in advance..