[ ... ] > That's unfortunate. How do we get the docs at > http://iforce.sun.com/protected/solaris10/adoptionkit/x86/techinfo.html > updated so the next poor slob does not trip over this?
I've already requested that. Or rather, I'm trying to find out who's owning this webpage so it can be changed ... > > It is hard to make this mistake on FreeBSD or on Linux 2.6, since both > have automatic ways for out-of-tree drivers to get the correct kernel > compiler flags. Maybe Sun could add something to getconf, so you > could get KERNEL_CFLAGS or KERNEL_GCCFLAGS similar to how you can get > LFS_CFLAGS.. It's impossible to make this mistake if you compile in the OpenSolaris build environment, since that uses the "cw" wrapper, which automatically adds some gcc options when compiling with gcc - including -mno-red-zone on amd64. http://cvs.opensolaris.org/source/xref/usr/src/tools/cw/cw.c#921 As said, a solution would also be to update the bundled compiler, but no matter what you do, update the compiler, provide some standard ENV, create band-aid-X - the damage is done, the genie is out of the bottle and people may/will/have hit this. The "Writing Device Drivers" guide on docs.sun.com explicitly mentions the compiler options required when using gcc. But as you've found, if there are conflicting instructions out ... :( Bye, FrankH.