+++ /dev/null
---- rpm-4.3/lib/rpmrc.c.orig 2004-03-29 14:43:40.000000000 +0200
-+++ rpm-4.3/lib/rpmrc.c 2004-03-29 14:52:50.141270392 +0200
-@@ -893,16 +893,13 @@
- #ifdef __LCLINT__
- *eax = *ebx = *ecx = *edx = 0;
- #endif
--#ifdef PIC
-- __asm__("pushl %%ebx; cpuid; movl %%ebx,%1; popl %%ebx"
-- : "=a"(*eax), "=g"(*ebx), "=&c"(*ecx), "=&d"(*edx)
-- : "a" (op));
--#else
-- __asm__("cpuid"
-- : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
-- : "a" (op));
--#endif
--
-+ asm volatile (
-+ "pushl %%ebx \n"
-+ "cpuid \n"
-+ "movl %%ebx, %%esi \n"
-+ "popl %%ebx \n"
-+ : "=a" (*eax), "=S" (*ebx), "=c" (*ecx), "=d" (*edx)
-+ : "a" (op));
- }
-
- /*
-@@ -911,15 +908,8 @@
- static inline unsigned int cpuid_eax(unsigned int op)
- /*@*/
- {
-- unsigned int val;
--
--#ifdef PIC
-- __asm__("pushl %%ebx; cpuid; popl %%ebx"
-- : "=a" (val) : "a" (op) : "ecx", "edx");
--#else
-- __asm__("cpuid"
-- : "=a" (val) : "a" (op) : "ebx", "ecx", "edx");
--#endif
-+ unsigned int tmp, val;
-+ cpuid(op, &val, &tmp, &tmp, &tmp);
- return val;
- }
-
-@@ -927,14 +917,7 @@
- /*@*/
- {
- unsigned int tmp, val;
--
--#ifdef PIC
-- __asm__("pushl %%ebx; cpuid; movl %%ebx,%1; popl %%ebx"
-- : "=a" (tmp), "=g" (val) : "a" (op) : "ecx", "edx");
--#else
-- __asm__("cpuid"
-- : "=a" (tmp), "=b" (val) : "a" (op) : "ecx", "edx");
--#endif
-+ cpuid(op, &tmp, &val, &tmp, &tmp);
- return val;
- }
-
-@@ -942,30 +925,16 @@
- /*@*/
- {
- unsigned int tmp, val;
--#ifdef PIC
-- __asm__("pushl %%ebx; cpuid; popl %%ebx"
-- : "=a" (tmp), "=c" (val) : "a" (op) : "edx");
--#else
-- __asm__("cpuid"
-- : "=a" (tmp), "=c" (val) : "a" (op) : "ebx", "edx");
--#endif
-+ cpuid(op, &tmp, &tmp, &val, &tmp);
- return val;
--
- }
-
- static inline unsigned int cpuid_edx(unsigned int op)
- /*@*/
- {
- unsigned int tmp, val;
--#ifdef PIC
-- __asm__("pushl %%ebx; cpuid; popl %%ebx"
-- : "=a" (tmp), "=d" (val) : "a" (op) : "ecx");
--#else
-- __asm__("cpuid"
-- : "=a" (tmp), "=d" (val) : "a" (op) : "ebx", "ecx");
--#endif
-+ cpuid(op, &tmp, &tmp, &tmp, &val);
- return val;
--
- }
-
- /*@unchecked@*/
+++ /dev/null
-diff -uNr rpm-4.3.orig/installplatform rpm-4.3/installplatform
---- rpm-4.3.orig/installplatform 2004-03-24 18:35:51.000000000 +0100
-+++ rpm-4.3/installplatform 2004-03-24 19:15:25.108751712 +0100
-@@ -21,7 +21,7 @@
-
- RPM="./rpm --rcfile $TEMPRC"
-
--canonarch_sed='s_i.86_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_\(powerpc\|ppc\)[^-]*_ppc_'
-+canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_\(powerpc\|ppc\)[^-]*_ppc_'
- arch="`$RPM --eval '%{_arch}'|sed -e "$canonarch_sed"`"
- VENDOR="`$RPM --eval '%{_vendor}'`"
- OS="`$RPM --eval '%{_os}'`"
-@@ -30,7 +30,7 @@
- target="`$RPM --eval '%{_target}'|sed -e "$canonarch_sed"`"
-
- case "$arch" in
-- i[3456]86|athlon) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_athlon_' ;;
-+ i[3456]86|pentium[34]|athlon) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_pentium3_ s_i386_pentium4_ s_i386_athlon_' ;;
- x86_64*|amd64*) SUBSTS="s/${arch}/x86_64/ s/${arch}/amd64/" ;;
- alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;;
- sparc*) SUBSTS='s_sparc\(64\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
-@@ -66,7 +66,7 @@
- s390x-linux) LIB=lib64; MULTILIBNO=2 ;;
- ppc-linux) MULTILIBNO=1 ;;
- ppc64-linux) LIB=lib64; MULTILIBNO=2 ;;
-- i?86-linux|athlon-linux) MULTILIBNO=1 ;;
-+ i?86-linux|pentium?-linux|athlon-linux) MULTILIBNO=1 ;;
- x86_64-linux|amd64-linux) LIB=lib64; MULTILIBNO=2 ;;
- esac
-
-diff -uNr rpm-4.3.orig/lib/rpmrc.c rpm-4.3/lib/rpmrc.c
---- rpm-4.3.orig/lib/rpmrc.c 2004-03-24 18:35:51.000000000 +0100
-+++ rpm-4.3/lib/rpmrc.c 2004-03-24 19:11:47.433843328 +0100
-@@ -1038,6 +1038,73 @@
- return 1;
- }
-
-+static int is_pentium3()
-+{
-+ unsigned int eax, ebx, ecx, edx, family, model;
-+ char vendor[16];
-+ cpuid(0, &eax, &ebx, &ecx, &edx);
-+ memset(vendor, 0, sizeof(vendor));
-+ *((unsigned int *)&vendor[0]) = ebx;
-+ *((unsigned int *)&vendor[4]) = edx;
-+ *((unsigned int *)&vendor[8]) = ecx;
-+ if (strncmp(vendor, "GenuineIntel", 12) != 0)
-+ return 0;
-+ cpuid(1, &eax, &ebx, &ecx, &edx);
-+ family = (eax >> 8) & 0x0f;
-+ model = (eax >> 4) & 0x0f;
-+ if (family == 6)
-+ switch (model)
-+ {
-+ case 7: // Pentium III, Pentium III Xeon (model 7)
-+ case 8: // Pentium III, Pentium III Xeon, Celeron (model 8)
-+ case 9: // Pentium M
-+ /*
-+ Intel recently announced its new technology for mobile platforms,
-+ named Centrino, and presents it as a big advance in mobile PCs.
-+ One of the main part of Centrino consists in a brand new CPU,
-+ the Pentium M, codenamed Banias, that we'll study in this review.
-+ A particularity of this CPU is that it was designed for mobile platform
-+ exclusively, unlike previous mobile CPU (Pentium III-M, Pentium 4-M)
-+ that share the same micro-architecture as their desktop counterparts.
-+ The Pentium M introduces a new micro-architecture, adapted for mobility
-+ constraints, and that is halfway between the Pentium III and the Pentium 4.
-+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-+ */
-+ case 10: // Pentium III Xeon (model A)
-+ case 11: // Pentium III (model B)
-+ return 1;
-+ }
-+ return 0;
-+}
-+
-+static int is_pentium4()
-+{
-+ unsigned int eax, ebx, ecx, edx, family, model;
-+ char vendor[16];
-+ cpuid(0, &eax, &ebx, &ecx, &edx);
-+ memset(vendor, 0, sizeof(vendor));
-+ *((unsigned int *)&vendor[0]) = ebx;
-+ *((unsigned int *)&vendor[4]) = edx;
-+ *((unsigned int *)&vendor[8]) = ecx;
-+ if (strncmp(vendor, "GenuineIntel", 12) != 0)
-+ return 0;
-+ cpuid(1, &eax, &ebx, &ecx, &edx);
-+ family = (eax >> 8) & 0x0f;
-+ model = (eax >> 4) & 0x0f;
-+ if (family == 15)
-+ switch (model)
-+ {
-+ case 0: // Pentium 4, Pentium 4 Xeon (0.18um)
-+ case 1: // Pentium 4, Pentium 4 Xeon MP, Celeron (0.18um)
-+ case 2: // Pentium 4, Mobile Pentium 4-M,
-+ // Pentium 4 Xeon, Pentium 4 Xeon MP,
-+ // Celeron, Mobile Celron (0.13um)
-+ case 3: // Pentium 4, Celeron (0.09um)
-+ return 1;
-+ }
-+ return 0;
-+}
-+
- #endif
-
- #if defined(__linux__) && defined(__powerpc__)
-@@ -1274,6 +1341,10 @@
-
- if ((class == '6' && is_athlon()) || class == '7')
- strcpy(un.machine, "athlon");
-+ else if (is_pentium4())
-+ strcpy(un.machine, "pentium4");
-+ else if (is_pentium3())
-+ strcpy(un.machine, "pentium3");
- else if (strchr("3456", un.machine[1]) && un.machine[1] != class)
- un.machine[1] = class;
- }
-diff -uNr rpm-4.3.orig/lib/rpmts.c rpm-4.3/lib/rpmts.c
---- rpm-4.3.orig/lib/rpmts.c 2004-01-07 01:39:05.000000000 +0100
-+++ rpm-4.3/lib/rpmts.c 2004-03-24 19:16:06.842407232 +0100
-@@ -194,7 +194,7 @@
- /*@-nullassign@*/
- /*@observer@*/
- static const char *arches[] = {
-- "i386", "i486", "i586", "i686", "athlon", "x86_64",
-+ "i386", "i486", "i586", "i686", "pentium3", "pentium4", "athlon", "x86_64",
- "alpha", "alphaev5", "alphaev56", "alphapca56", "alphaev6", "alphaev67",
- "sparc", "sun4", "sun4m", "sun4c", "sun4d", "sparcv9",
- "sparc64", "sun4u",
-diff -uNr rpm-4.3.orig/macros.in rpm-4.3/macros.in
---- rpm-4.3.orig/macros.in 2004-03-24 18:35:50.000000000 +0100
-+++ rpm-4.3/macros.in 2004-03-24 19:16:49.466927320 +0100
-@@ -1116,7 +1116,7 @@
- # rpm can use regular expressions against target platforms in macro
- # conditionals.
- #
--%ix86 i386 i486 i586 i686 athlon
-+%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
-
- #------------------------------------------------------------------------
- # Use in %install to generate locale specific file lists. For example,
-diff -uNr rpm-4.3.orig/rpmrc.in rpm-4.3/rpmrc.in
---- rpm-4.3.orig/rpmrc.in 2004-03-24 18:35:51.000000000 +0100
-+++ rpm-4.3/rpmrc.in 2004-03-24 19:18:56.682587600 +0100
-@@ -16,6 +16,8 @@
- optflags: i486 -O2 -march=i486%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i486: %{specflags_i486}}}
- optflags: i586 -O2 -march=i586%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i586: %{specflags_i586}}}
- optflags: i686 -O2 -march=i686%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i686: %{specflags_i686}}}
-+optflags: pentium3 -O2 -march=pentium3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium3: %{specflags_pentium3}}}
-+optflags: pentium4 -O2 -march=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium4: %{specflags_pentium4}}}
- optflags: athlon -O2 -march=athlon%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_athlon: %{specflags_athlon}}}
- optflags: ia64 -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia64: %{specflags_ia64}}}
- optflags: x86_64 -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_x86_64: %{specflags_x86_64}} %{?specflags_amd64: %{specflags_amd64}} }
-@@ -68,6 +70,8 @@
- # Canonical arch names and numbers
-
- arch_canon: athlon: athlon 1
-+arch_canon: pentium4: pentium4 1
-+arch_canon: pentium3: pentium3 1
- arch_canon: i686: i686 1
- arch_canon: i586: i586 1
- arch_canon: i486: i486 1
-@@ -167,6 +171,8 @@
- buildarchtranslate: osfmach3_i386: i386
-
- buildarchtranslate: athlon: athlon
-+buildarchtranslate: pentium4: pentium4
-+buildarchtranslate: pentium3: pentium3
- buildarchtranslate: i686: i686
- buildarchtranslate: i586: i586
- buildarchtranslate: i486: i486
-@@ -218,6 +224,8 @@
- arch_compat: alpha: axp noarch
-
- arch_compat: athlon: i686
-+arch_compat: pentium4: pentium3
-+arch_compat: pentium3: i686
- arch_compat: i686: i586
- arch_compat: i586: i486
- arch_compat: i486: i386
-@@ -307,6 +315,8 @@
- buildarch_compat: ia64: noarch
-
- buildarch_compat: athlon: i686
-+buildarch_compat: pentium4: pentium3
-+buildarch_compat: pentium3: i686
- buildarch_compat: i686: i586
- buildarch_compat: i586: i486
- buildarch_compat: i486: i386