2008-09-12 20:37:28 +02:00
|
|
|
Patch machine detection code: detect transmeta, rename parisc to hppa. [#52713]
|
2006-12-19 00:17:44 +01:00
|
|
|
|
2011-05-16 18:07:44 +02:00
|
|
|
--- ./lib/rpmrc.c.orig 2010-12-03 12:11:57.000000000 +0000
|
|
|
|
+++ ./lib/rpmrc.c 2011-05-11 12:48:02.000000000 +0000
|
2009-08-28 15:54:03 +02:00
|
|
|
@@ -1,9 +1,6 @@
|
2006-12-19 00:17:44 +01:00
|
|
|
#include "system.h"
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
-#if defined(__linux__) && defined(__powerpc__)
|
|
|
|
-#include <setjmp.h>
|
|
|
|
-#endif
|
|
|
|
|
2011-05-16 18:07:44 +02:00
|
|
|
#if HAVE_SYS_UTSNAME_H
|
|
|
|
#include <sys/utsname.h>
|
|
|
|
@@ -788,6 +785,14 @@ static inline int RPMClass(void)
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
cpu = (tfms>>8)&15;
|
|
|
|
|
2008-09-12 20:37:28 +02:00
|
|
|
+ if (cpu == 5
|
2006-12-19 00:17:44 +01:00
|
|
|
+ && cpuid_ecx(0)=='68xM'
|
|
|
|
+ && cpuid_edx(0)=='Teni'
|
|
|
|
+ && (cpuid_edx(1) & ((1<<8)|(1<<15))) == ((1<<8)|(1<<15))) {
|
|
|
|
+ sigaction(SIGILL, &oldsa, NULL);
|
|
|
|
+ return 6; /* has CX8 and CMOV */
|
|
|
|
+ }
|
|
|
|
+
|
2008-09-12 20:37:28 +02:00
|
|
|
sigaction(SIGILL, &oldsa, NULL);
|
2006-12-19 00:17:44 +01:00
|
|
|
|
2008-09-12 20:37:28 +02:00
|
|
|
if (cpu < 6)
|
2011-05-16 18:07:44 +02:00
|
|
|
@@ -924,15 +929,6 @@ static int is_geode()
|
2008-09-12 20:37:28 +02:00
|
|
|
}
|
2006-12-19 00:17:44 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
-#if defined(__linux__) && defined(__powerpc__)
|
|
|
|
-static jmp_buf mfspr_jmpbuf;
|
|
|
|
-
|
|
|
|
-static void mfspr_ill(int notused)
|
|
|
|
-{
|
|
|
|
- longjmp(mfspr_jmpbuf, -1);
|
|
|
|
-}
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
/**
|
|
|
|
*/
|
2009-08-28 15:54:03 +02:00
|
|
|
static void defaultMachine(const char ** arch,
|
2011-05-16 18:07:44 +02:00
|
|
|
@@ -1059,6 +1055,11 @@ static void defaultMachine(const char **
|
2006-12-19 00:17:44 +01:00
|
|
|
/* big endian */
|
|
|
|
strcpy(un.machine, "mips");
|
|
|
|
# endif
|
|
|
|
+ /* in linux, lets rename parisc to hppa */
|
|
|
|
+#if defined(__linux__)
|
|
|
|
+ if (!strcmp(un.machine,"parisc"))
|
|
|
|
+ strcpy(un.machine,"hppa");
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
# if defined(__hpux) && defined(_SC_CPU_VERSION)
|
|
|
|
{
|