This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Accessing HWCAP on PowerPC?
On Sat, 2004-10-16 at 02:51, Ian Romanick wrote:
> What I'm trying to do is dynamically detect things like VMX to selected
> optimized routines at run-time in libGL and layered DRI drivers.
> Parameters passed to main do me no good. :( I'm currently examining
> /proc/<pid>/auxv to get the information, but that's specific to 2.6.x
> Linux kernels. I'd prefer a solution that will run on 2.4 kernels or BSD.
Well, if glibc exported AT_HWCAP some way, that would work with 2.4
kernels too. If not, then you can do the horrible trick others are
doing which is to install a sigill handler and do a vector instruction,
but I dislike libs that hack signal handlers in the back of their host
applications...
Ben.