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
|
|
|
|
2012-08-28 15:31:44 +02:00
|
|
|
--- ./lib/rpmrc.c.orig 2012-06-01 10:38:24.000000000 +0000
|
|
|
|
+++ ./lib/rpmrc.c 2012-06-01 10:44:59.000000000 +0000
|
|
|
|
@@ -786,6 +786,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
|
2012-08-28 15:31:44 +02:00
|
|
|
+ && cpuid_ecx(0) == '68xM'
|
|
|
|
+ && cpuid_edx(0) == 'Teni'
|
2006-12-19 00:17:44 +01:00
|
|
|
+ && (cpuid_edx(1) & ((1<<8)|(1<<15))) == ((1<<8)|(1<<15))) {
|
|
|
|
+ sigaction(SIGILL, &oldsa, NULL);
|
2012-08-28 15:31:44 +02:00
|
|
|
+ return 6; /* has CX8 and CMOV */
|
2006-12-19 00:17:44 +01:00
|
|
|
+ }
|
|
|
|
+
|
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)
|
2012-08-28 15:31:44 +02:00
|
|
|
@@ -1023,6 +1031,12 @@ static void defaultMachine(const char **
|
2006-12-19 00:17:44 +01:00
|
|
|
strcpy(un.machine, "mips");
|
|
|
|
# endif
|
2012-08-28 15:31:44 +02:00
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
+#if defined(__linux__)
|
2012-08-28 15:31:44 +02:00
|
|
|
+ /* in linux, lets rename parisc to hppa */
|
|
|
|
+ if (rstreq(un.machine, "parisc"))
|
|
|
|
+ strcpy(un.machine, "hppa");
|
2006-12-19 00:17:44 +01:00
|
|
|
+#endif
|
2012-08-28 15:31:44 +02:00
|
|
|
+
|
2006-12-19 00:17:44 +01:00
|
|
|
# if defined(__hpux) && defined(_SC_CPU_VERSION)
|
|
|
|
{
|
2012-08-28 15:31:44 +02:00
|
|
|
# if !defined(CPU_PA_RISC1_2)
|