On Tuesday 2009-12-22 16:21, Jan Engelhardt wrote: >On Tuesday 2009-12-22 01:19, Dennis Gilmore wrote: >>On Monday 21 December 2009 06:06:26 pm Jan Engelhardt wrote: >>> >>> RPM offers the targets sparcv9v/sparc64v (which is, simply put, >>> cflags += -mtune=niagara). >>> >>> But how would the package manager (apt-get/yum/zypper) decide whether >>> they are on sun4v or not[...] >> >>yum does this by checking /proc/cpuinfo look at /usr/lib/python2.6/site- >>packages/rpmUtils/arch.py on a F-12 box and search for sun4v rpm has a >>similar check based on the same information. both will refuse to install a >>sparcv9v package on hardware that is not capable of running it. [...] But is there a C-programmatical way that does not rely on external files? /proc may not be mounted. auxv is usually not accessible, and forking is a sin too. OpenSSL uses assembler tricks and traps to determine if something has 4v or not, which leaves the realm of C. But it looks like it's okay, given x86 programs also do asm/cpuid to determine SSE availability. Jan -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html