I already answered your question on 
http://forums.sun.com/thread.jspa?threadID=5418758

Copying here as well:
 
Support for __asm__ keyword was added very recently, in Sun Studio 12 
update 1, if I'm not mistaken. The path name to your compiler is 
suggesting that you are using Sun One Studio 8 compiler, which is 6 
years old. Please consider upgrading.

If you are on Solaris 10, then latest version of Sun Studio will do: Sun 
Studio 12 update 1 is downloadable for free here: 
http://developers.sun.com/sunstudio/downloads/


Bing Zhao - Sun Microsystems wrote:
> Hi All:
>
> I want to copy the file 
> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/common/hdcrc/hd_crc.h
> on a *S10* x86 machine for crc32 calculation. But when I want to 
> compile it which cc, the compiler says that
> the __asm__ is a undefined symbol. The build log is at below. How can 
> I resolve this problem? Please help me
> here. Thanks in advance.
>
> bz218491 at kawagarbo:$ make
> /export/tools/on10-tools/SUNWspro/SOS8/bin/cc -O -D_ASM_INLINES     
> -Xa -xildoff -errtags=yes -errwarn=%all 
> -erroff=E_EMPTY_TRANSLATION_UNIT  -erroff=E_STATEMENT_NOT_REACHED 
> -xc99=%none   -g -xc99=%none -W0,-noglobal -DDEBUG -D_KERNEL 
> -D_SYSCALL32 -DSYSACCT -DC2_AUDIT -DBUILD_DATE=\"20091204\" -I./hdrs 
> -I/var/tmp/bz218491/SUNWonnwsint/usr/src/uts/intel 
> -I/var/tmp/bz218491/SUNWonnwsint/usr/src/uts/i86pc -Y 
> I,/var/tmp/bz218491/SUNWonnwsint/usr/src/uts/common -I 
> /var/tmp/bz218491/SUNWonnwsint/proto/root_i386/usr/include -I./hdrs 
> -I../common_iscsi/hdrs -c -o debug32/idm_impl.o src/idm_impl.c
> "./hdrs/hd_crc.h", line 70: undefined symbol: __asm__
> "./hdrs/hd_crc.h", line 70: syntax error before or at: __volatile__
> "./hdrs/hd_crc.h", line 77: cannot recover from previous errors
> cc: acomp failed for src/idm_impl.c
> *** Error code 2
> make: Fatal error: Command failed for target `debug32/idm_impl.o'
>
> Regards,
> Bing
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> tools-compilers mailing list
> tools-compilers at opensolaris.org
>   

Reply via email to