Tres Melton posted <[EMAIL PROTECTED]>, excerpted
below, on Tue, 29 Nov 2005 09:15:13 -0700:
> So the issue is do ebuilds use CHOST or KEYWORD to key the build for. I
> don't know enough about portage to say for sure but I thought they all
> used CHOST. If there is one that uses the KEYWORD then link me bud. :p
That's possible. I'm talking about the use tests seen in ebuilds, ie
"if use x86; then" type tests. If you can say definitively that these use
CHOST not keywords, then I'll take your word for it, but I always though
it tested keywords (particularly since amd64 would be x86_64 CHOST,
right? unless the use macro does the conversion from common/gentoo-speak
to chost-speak internally?) but I could certainly be incorrect as it's not
something I've specifically traced.
Both of these from xorg-x11-6.8.99.15-r4.ebuild, host_def_setup section:
Test for amd64 (won't be run if x86)
# Enable i810 on x86_64 (RH #126687)
if use amd64; then
echo "#define XF86ExtraCardDrivers i810" >> ${HOSTCONF}
fi
Test for x86 or alpha (won't be run if amd64)
if use x86 || use alpha; then
# build with glide3 support? (build the tdfx_dri.o
module)
if use 3dfx; then
echo "#define HasGlide3 YES" >> ${HOSTCONF}
fi
# This won't work unless we can disable building the tdfx
stuff
# entirely :/
# use_build 3dfx HasGlide3
fi
As I said earlier, these sorts of tests tend to be most common in packages
like toolchain (gcc/binutils/etc) and X, but they do occasionally occur
elsewhere, as with x86-optimized assembly in media codec applications,
for instance. (No specific instances to point out as I've not looked, but
that's the generally given example when pointing out where arch specific
code might be used, even between x86 hardware versions,
386/586/686/mmx/3dnow/sse/sse2/sse3/whatever, tho of course on x86, gentoo
has USE flags for that sort of optimization, where needed.)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman in
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html
--
[email protected] mailing list