ALT Linux Bugzilla
– Attachment 1634 Details for
Bug 9991
Нерабочий --target athlonxp (rpm-4.0.4-alt66)
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
athlon_xp.add.patch
athlon_xp.add.patch (text/plain), 6.42 KB, created by
solo
on 2006-09-18 14:21:26 MSD
(
hide
)
Description:
athlon_xp.add.patch
Filename:
MIME Type:
Creator:
solo
Created:
2006-09-18 14:21:26 MSD
Size:
6.42 KB
patch
obsolete
>diff --git a/Makefile.am b/Makefile.am >index 7b76bd1..a91a68a 100644 >--- a/Makefile.am >+++ b/Makefile.am >@@ -142,6 +142,7 @@ install-data-local: > $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i686 ;\ > $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;\ > $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlonxp ;\ >+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon_xp ;\ > $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/pentium2 ;\ > $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/pentium3 ;\ > $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/pentium4 ;;\ >diff --git a/installplatform b/installplatform >index fd0a3c9..d3d577b 100755 >--- a/installplatform >+++ b/installplatform >@@ -30,8 +30,8 @@ target_platform="`$RPM --eval '%{?_gnu:% > target="`$RPM --eval '%{_target}'`" > > case "$arch" in >- i[3456]86|k6|athlon|athlonxp|pentium[234]) >- SUBSTS='s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_i386_ s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_i486_ s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_i586_ s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_i686_ s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_k6_ s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_athlon_ s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_athlonxp_ s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_pentium2_ s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_pentium3_ s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_pentium4_ s_\(i[3456]86\|k6\|athlonxp\|athlon\|pentium[234]\)_noarch_' >+ i[3456]86|k6|athlon|athlonxp|athlon_xp|pentium[234]) >+ SUBSTS='s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_i386_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_i486_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_i586_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_i686_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_k6_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_athlon_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_athlon\_xp_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_athlonxp_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_pentium2_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_pentium3_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_pentium4_ s_\(i[3456]86\|k6\|athlon\_xp\|athlonxp\|athlon\|pentium[234]\)_noarch_' > ;; > alpha*) > SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' >diff --git a/lib/rpmrc.c b/lib/rpmrc.c >index 80ab644..c7808a3 100644 >--- a/lib/rpmrc.c >+++ b/lib/rpmrc.c >@@ -990,6 +990,30 @@ static int is_athlon(void) > return 1; > } > >+ >+static int is_athlon_xp(void) >+{ >+ 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, "AuthenticAMD", 12) != 0) >+ return 0; >+ cpuid(1, &eax, &ebx, &ecx, &edx); >+ family = (eax >> 8) & 0x0f; >+ model = (eax >> 4) & 0x0f; >+ if (family == 6) >+ switch (model) >+ { >+ case 10: // Athlon XP (model 10) >+ return 1; >+ } >+ return 0; >+} >+ > static int is_pentium3(void) > { > unsigned int eax, ebx, ecx, edx, family, model; >@@ -1298,7 +1322,9 @@ # if defined(__linux__) && defined(__i38 > { > char class = (char) (RPMClass() | '0'); > >- if ((class == '6' && is_athlon()) || class == '7') >+ if (is_athlon_xp()) >+ strcpy(un.machine, "athlon_xp"); >+ else if ((class == '6' && is_athlon()) || class == '7') > strcpy(un.machine, "athlon"); > else if (is_pentium4()) > strcpy(un.machine, "pentium4"); >diff --git a/rpm-4_0.spec b/rpm-4_0.spec >index d671dec..8420428 100644 >--- a/rpm-4_0.spec >+++ b/rpm-4_0.spec >@@ -4,7 +4,7 @@ > > Name: %rpm_name > Version: %rpm_version >-Release: alt66 >+Release: alt66.1 > > %define ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}} > %define get_dep() %(rpm -q --qf '%%{NAME} >= %%|SERIAL?{%%{SERIAL}:}|%%{VERSION}-%%{RELEASE}' %1 2>/dev/null || echo '%1 >= unknown') >@@ -522,6 +522,14 @@ #%config(noreplace,missingok) %_sysconfd > %endif #with contrib > > %changelog >+* Fri Sep 15 2006 Aleksey Avdeev <solo@altlinux.ru> 4.0.4-alt66.1 >+- NMU (fixed #9991): >+ + lib/rpmrc.c: added is_athlon_xp. >+ + Added athlon_xp in: >+ Makefile.am >+ installplatform >+ rpmrc.in >+ > * Sun May 14 2006 Dmitry V. Levin <ldv@altlinux.org> 4.0.4-alt66 > - Fixed build with gcc-4.1.0. > >diff --git a/rpmrc.in b/rpmrc.in >index 48a3219..5cab0e2 100644 >--- a/rpmrc.in >+++ b/rpmrc.in >@@ -20,6 +20,7 @@ optflags: pentium4 %optflags_default -ma > optflags: k6 %optflags_default -march=k6 -mtune=athlon-xp > optflags: athlon %optflags_default -march=athlon -mtune=athlon-xp > optflags: athlonxp %optflags_default -march=athlon-xp >+optflags: athlon_xp %optflags_default -march=athlon-xp > optflags: amd64 %optflags_default > optflags: ia64 %optflags_default > optflags: ia32e %optflags_default >@@ -80,6 +81,7 @@ # Canonical arch names and numbers > arch_canon: pentium4: pentium4 1 > arch_canon: pentium3: pentium3 1 > arch_canon: pentium2: pentium2 1 >+arch_canon: athlon_xp: athlon_xp 1 > arch_canon: athlonxp: athlonxp 1 > arch_canon: athlon: athlon 1 > arch_canon: i686: i686 1 >@@ -195,6 +197,7 @@ buildarchtranslate: ia32e: x86_64 > buildarchtranslate: pentium4: pentium4 > buildarchtranslate: pentium3: pentium3 > buildarchtranslate: pentium2: pentium2 >+buildarchtranslate: athlon_xp: athlon_xp > buildarchtranslate: athlonxp: athlonxp > buildarchtranslate: athlon: athlon > buildarchtranslate: i686: i686 >@@ -244,6 +247,7 @@ arch_compat: alphaev5: alpha > arch_compat: alpha: axp noarch > > arch_compat: pentium4: pentium3 >+arch_compat: athlon_xp: athlonxp > arch_compat: athlonxp: athlon pentium3 > arch_compat: pentium3: pentium2 > arch_compat: athlon: k6 pentium2 >@@ -308,7 +312,7 @@ arch_compat: ia64: noarch > > arch_compat: amd64: x86_64 > arch_compat: ia32e: x86_64 >-arch_compat: x86_64: athlonxp pentium4 >+arch_compat: x86_64: athlon_xp athlonxp pentium4 > > os_compat: IRIX64: IRIX > os_compat: solaris2.7: solaris2.3 solaris2.4 solaris2.5 solaris2.6 >@@ -346,6 +350,7 @@ buildarch_compat: amd64: x86_64 > buildarch_compat: ia32e: x86_64 > > buildarch_compat: pentium4: pentium3 >+buildarch_compat: athlon_xp: athlonxp > buildarch_compat: athlonxp: athlon pentium3 > buildarch_compat: pentium3: pentium2 > buildarch_compat: athlon: k6 pentium2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 9991
:
1625
| 1634