Hi Alexander and Maxim: Thank you very much for your response. But upgrading the build server is really painful for me. And I am not the administrator of the public build server. So I want to use the workaround of 6607624 . I add below in my code.
#ifndef __linux__ #define __asm__ asm #define __volatile__ volatile #endif But I find that the cc still can't recognize volatile as follow. Do you know how can I resolve this problem? Thanks again for your response. Regards, Bing 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=\"20091207\" -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 74: syntax error before or at: volatile "./hdrs/hd_crc.h", line 74: 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' Current working directory /net/fogbroom/bjroot/users/bing/S10/iser_backport/src/sun_nws/idm bz218491 at kawagarbo:$ Alexander.Gorshenev at Sun.COM wrote: > > SOS8 you are using is about 2004. > The __asm__ keyword support in studio appeared in about 2005-2006. > Why don't you use anything more modern? > > Alexander > > On Fri, 4 Dec 2009, 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 >> >> >
