Bug 39243

Summary: /usr/lib/rpm/rpmrc optflags i386 fails on RH 5.2 on i486 machine
Product: [Retired] Red Hat Linux Reporter: Need Real Name <drepasky>
Component: rpm-buildAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
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: 2001-05-06 04:50:23 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 Need Real Name 2001-05-06 04:50:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.19 i586; Nav)

Description of problem:
The /usr/lib/rpm/rpmrc file of rpm-build-4.02-5x contains the entry 
   optflags: i386 -O2 -march=i386 -mcpu-i686
This results in failure of configure scripts when compiling
openssh-2.9p1-1.src.rpm
(from www.openssh.com).  Gcc burps on the -march and -mcpu options.on a 
486 Red Hat 5.2 machine running gcg-2.7.2.3-14.i386.rpm, saying that the
options
are not found.  

The problem is solved by commenting out the optflags: i386 and uncommenting
the old
one:
   optflags: i386 -O2 -m386 -fno-strength=reduce
which, thankfully, is still in the file. 

How reproducible:
Always

Steps to Reproduce:
1. wget
ftp://ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/rpm/SRPMS/openssh-2.9p1-1.src.rpm

2.rpm -ivh openssh*src.rpm
3.rpmbuild -ba openssh.spec
	

Actual Results:  rpm build reports an error from the /tmp script that is
used to configure and
compile openssh.

Expected Results:  rpm should build the rpm without 

Additional info:

Additional info seems unnecessary because the fix is provided above.

Comment 1 Jeff Johnson 2001-05-06 13:19:39 UTC
The other (and possibly better) alternative is to use egcs for compiling,
that's the compiler that was used for everything but the kernel in Red Hat 5.2.
Meanwhile, rpm tries to distribute a default configuration that is correct for
most
platforms.