three things I stumbled onto while building xnu-792.17.14
three things I stumbled onto while building xnu-792.17.14
- Subject: three things I stumbled onto while building xnu-792.17.14
- From: <email@hidden>
- Date: Wed, 02 May 2007 20:59:59 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Stumbled onto three things while trying to build xnu. Let me
split them up; they really aren't related to one-another...
....
I'm just curious. What would it take to fix xnu to be able to use
gcc-4.0? This is the first error I hit:
[…]
/Users/scifi/Projects/xnu/xnu-
792.17.14_huh/iokit/Kernel/IOWorkLoop.cpp: In member function
‘virtual bool IOWorkLoop::init()’:
/Users/scifi/Projects/xnu/xnu-
792.17.14_huh/iokit/Kernel/IOWorkLoop.cpp:79: error: converting
from `IOReturn (IOWorkLoop::*)(void*, void*, void*, void*)' to
`IOReturn (*)(OSObject*, void*, void*, void*, void*)' in a kext.
Use OSMemberFunctionCast() instead.
/Users/scifi/Projects/xnu/xnu-
792.17.14_huh/iokit/Kernel/IOWorkLoop.cpp:93: warning: invalid
conversion from ‘void (*)(void*, wait_result_t)’ to ‘void
(*)(void*)’
/Users/scifi/Projects/xnu/xnu-
792.17.14_huh/iokit/Kernel/IOWorkLoop.cpp:93: warning:
initializing argument 1 of ‘thread* IOCreateThread(void (*)(void*),
void*)’
[…]
Could we use a -std= option or something similar to let gcc-4.0
handle IOWorkLoop.cpp line 79 as gcc-3.3 would have?
The reason I'm asking is that I'm very keen on wanting to try
testing optimisations only available with gcc-4.0 such as
- -ftree-vectorize (a very important one).
....
A second issue with xnu is that it uses "echo -n" quite a lot in
the scripts -- this is not supported by the latest bash-3.2.x,
producing some very strange "No rule for" errors. This is
actually a very common problem with many many projects all around
the world. Most scripts will perform a test (a) for whether echo
needs the -n, or (b) does a \c need to be added to the string to
be echoed, to prevent the automatic linefeed. With xnu, I've
simply replaced all plain echo cmds with /bin/echo or coreutils
/usr/local/bin/echo both of which do support the -n.
....
A third issue is with using the latest GNU make-3.81+. A few ppl
have been trying to convince the team to accept and apply Apple's
patch for the Objective-C rules and others, to be included as
"implicit" rules anymore. The bug-report for this is
<https://savannah.gnu.org/bugs/?16389> with more detail and
arguments.
But even with the patch mentioned in that bug-report, make-3.81+
is still missing some of the rules inside xnu, forcing us to
continue to use Apple's gnumake. I'm thinking the patch isn't
completely including all of Apple's mods to make.
As an aside here, tho, if you-all are interested in trying to
convince the GNU-make team to accept Apple's patches, please
add a comment to that savannah bug-report by all means.
....
Well, that's not all I've stumbled onto, there were problems
galore in the prerequisite modules (for ex. relpath needs a lot of
"slight of hand" manipulation over & above the developer docs &
READMEs etc.). But the three above were easily documented. ;)
And for me it's not much worth building a kernel & kexts if we
can't utilise gcc-4.0's tweaks to wring out the power of these
Dual G5s I have. ;)
Yeah I could file bug-reports with Apple but boy they must have an
avalanche already. (and no I can't afford to $pay$ for expediting
anything…)
Thanks for reading. I hope I can stay tuned for any feedback (if
the connection stays up etc.).
-----BEGIN PGP SIGNATURE-----
Note: This signature can be verified at https://www.hushtools.com/verify
Version: Hush 2.5
wkYEARECAAYFAkY5QikACgkQZbt5KOxKrtQ0DACghHruNQPTrYMfifJBeMhr/H1m9Y0A
oJCAHPeq9A3x4z+cHSDN1wDjnAY0
=aNC0
-----END PGP SIGNATURE-----
--
Click for home mortgage, fast & free, no lender fee, approval today
http://tagline.hushmail.com/fc/CAaCXv1QbtNiGM6OS81uSl1TC5VwDP8y/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden