glibc-2.8_p20080602-r1.ebuild has this: if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." ewarn "This will result in a 50% performance penalty, which is probably not what you want." fi But that isn't correct if the hypervisor is 64bit. I suggest a simply wording change and (maybe) drop the ewarn to an elog. 19:32 <@caker> darkside_: -mno-tls-direct-seg-refs isn't required when the hypervisor is x86_64 .. not sure what one can poke at within the domU to determine that, however 19:33 < darkside_> caker: ah, ok. well, we can adjust the warning message. no problem there 19:33 <@caker> sounds like a plan 19:34 < bd_> Isn't there a kernel capability flag? 19:34 < bd_> At least on debian, there's a libc6-xen package that adds a -mno-tls-direct-seg-refs build of glibc - but it's only selected if it's detected to be needed at runtime 19:35 < bd_> So, one could take a look at whatever ld.so looks at to determine that 19:35 <@caker> at runtime, huh? .. cool 19:35 <@caker> there's also something within domU kernels that prints a warning the first time userspace tickles it .. but I figured that was magic
except that we cant do detection at build time. the warning was added in the first place because the xen guys wanted it. either suggest a rewording or i'll punt it and the xen guys can suck it.
Hm, ok. I was just looking for something like: -ewarn "This will result in a 50% performance penalty, which is probably not what you want." +ewarn "This will result in a 50% performance penalty (unless your hypervisor is 64bit), which is probably not what you want." My knowledge on this subject is limited so you can close this bug if desired.
http://sources.gentoo.org/sys-libs/glibc/files/eblits/pkg_setup.eblit?r1=1.2&r2=1.3