rpm/rpmrctests.diff
OBS User autobuild 25f00b6cb5 Accepting request 18841 from Base:System
Copy from Base:System/rpm based on submit request 18841 from user mlschroe

OBS-URL: https://build.opensuse.org/request/show/18841
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=84
2009-08-28 13:54:03 +00:00

60 lines
1.3 KiB
Diff

Patch machine detection code: detect transmeta, rename parisc to hppa. [#52713]
Index: lib/rpmrc.c
===================================================================
--- lib/rpmrc.c.orig
+++ lib/rpmrc.c
@@ -1,9 +1,6 @@
#include "system.h"
#include <stdarg.h>
-#if defined(__linux__) && defined(__powerpc__)
-#include <setjmp.h>
-#endif
#include <ctype.h> /* XXX for /etc/rpm/platform contents */
@@ -784,6 +781,14 @@ static inline int RPMClass(void)
cpu = (tfms>>8)&15;
+ if (cpu == 5
+ && 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 */
+ }
+
sigaction(SIGILL, &oldsa, NULL);
if (cpu < 6)
@@ -920,15 +925,6 @@ static int is_geode()
}
#endif
-#if defined(__linux__) && defined(__powerpc__)
-static jmp_buf mfspr_jmpbuf;
-
-static void mfspr_ill(int notused)
-{
- longjmp(mfspr_jmpbuf, -1);
-}
-#endif
-
/**
*/
static void defaultMachine(const char ** arch,
@@ -1055,6 +1051,11 @@ static void defaultMachine(const char **
/* 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)
{