Bug 70539

Summary: athlon shows up as i786
Product: [Retired] Red Hat Public Beta Reporter: Harald Hoyer <harald>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: limbo   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-08-02 12:34:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Harald Hoyer 2002-08-02 12:34:20 UTC
Description of Problem:
$ rpmbuild --showrc|head
ARCHITECTURE AND OS:
build arch            : i786
compatible build archs: i786
build os              : Linux
compatible build os's : Linux
install arch          : i786
install os            : Linux
compatible archs      : i786
compatible os's       : Linux


Version-Release number of selected component (if applicable):
$ rpm -qf $(which rpmbuild )
rpm-build-4.1-0.63


lib/rpmrc.c:
	    if (class == '6' && is_athlon())
	    	strcpy(un.machine, "athlon");
and:
RPMClass()
...
	if (cap & (1<<15)) {
		/* CMOV supported? */
		if (capamd & (1<<30))
			return 7;	/* 3DNOWEXT supported */
		return 6;
	}


Solution:
	    if ((class == '6' && is_athlon()) || class == '7')
	    	strcpy(un.machine, "athlon");

Comment 1 Jeff Johnson 2002-08-02 13:16:42 UTC
Correction, athlon with CMOV shows up as i786.

Your patch is applied in rpm-4.1-0.64, but CMOV
wrto the thundering herd of x86 is gonna need
fixing pretty soon. This asm voodoo in lib/rpmrc.c
is breaking badly.

Comment 2 Harald Hoyer 2002-08-02 13:21:56 UTC
ok, i786, but then i786 should be able to install ix86 packages!!!

Comment 3 Jeff Johnson 2002-08-02 13:28:40 UTC
No argument here, but then the question becomes
	What's an arch (in rpm terms)?
	What's an install (in rpm terms)?
For example, a package with executables that use CMOV intended for
rpm arch "athlon" will install perfectly -- but not function --
with your patch as applied. And, of course, there ain't no
such beastie as "i786" outside of rpm.

FYI You can do
	echo "athlon-redhat-linux-gnu" > /etc/rpm/platform
to work around this crap.