index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | src/pacman/conf.c | 7 |
diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 0f0c2cfb..23744328 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <cpuid.h> #include <errno.h> #include <limits.h> #include <locale.h> /* setlocale */ @@ -401,6 +402,12 @@ int config_add_architecture(char *arch) char *newarch; uname(&un); newarch = strdup(un.machine); + if(strcmp(newarch, "i686") == 0) { + unsigned int eax, ebx, ecx, edx; + __get_cpuid(1, &eax, &ebx, &ecx, &edx); + if (edx & bit_SSE2) + newarch = strdup("pentium4"); + } free(arch); arch = newarch; } |