Andrew Gallatin writes:
> James Carlson wrote:
> > stevens writes:
> >> bash-3.00$ cc -D_KERNEL -m64 -c qotd_1.c
> > 
> > What compiler is that?  If it's gcc, then you'll need at least
> > something like this to compile 64-bit kernel modules:
> > 
> >     -fno-builtin -fno-asm -nodefaultlibs -m64 -mtune=opteron \
> >     -fno-strict-aliasing -O2 -ffreestanding -mcmodel=kernel \
> >     -mno-red-zone -gdwarf-2 -D_KERNEL -D_SYSCALL32 -D_SYSCALL32_IMPL
> 
> Why -fno-asm?  Half the point of using gcc for me is to be able to
> use inline asm, rather than the bizarre .il stuff Sun's CC
> forces on you.

You can still use assembly; "-fno-asm" doesn't turn it off.

All that does is fix it so that 'asm', 'inline', and 'typeof' become
regular identifiers, and you have to use '__asm__' for gcc-style
in-line assembly.

I've had to do that to avoid having the nonstandard gcc-usurped
identifiers run into uncooperative code.  If your code is different,
then I guess it's not a problem for you.  ;-}

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to