Bug 174812

Summary: optflags contain deprecated -mcpu compiler flag
Product: [Fedora] Fedora Reporter: Ansgar Esztermann <ansgar>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: low Docs Contact:
Priority: medium    
Version: 5   
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: 2005-12-03 02:43:47 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:
Attachments:
Description Flags
proposed patch none

Description Ansgar Esztermann 2005-12-02 14:03:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 Galeon/1.3.21

Description of problem:
The optflags variable for the i386 architecture as defined in /usr/lib/rpm/rpmrc includes -mcpu=i686. This flag is deprecated by the gcc compiler and generates a warning. For most packages, the only bad result is a ton of warnings while compiling; however in some cases the extra compiler warning may change the result of a configure script.


Version-Release number of selected component (if applicable):
rpm-4.4.2-7

How reproducible:
Always

Steps to Reproduce:
Compile a source rpm that does not define the CFLAGS variable.
  

Actual Results:  The gcc compiler warns:
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.


Expected Results:  No compiler warning should appear.

Additional info:

Workaround: include the line
optflags: i386 -O2 -g -march=i386 -mtune=i686
in the file /etc/rpmrc

Comment 1 Ansgar Esztermann 2005-12-02 14:08:50 UTC
Created attachment 121753 [details]
proposed patch

use -mtune=i686 rather than deprecated -mcpu=i686

Comment 2 Ansgar Esztermann 2005-12-02 14:18:14 UTC
1: The same problem exists in fc4. Should I open a new bug for that?

2: There are other architectures that also use the -mcpu option, presumably with
the same results. I did not change these in the attached patch, however, since I
have no way of testing the patch on these systems.

Comment 3 Jeff Johnson 2005-12-03 02:43:47 UTC
install the redhat-dpm-config patch.

And report a bug against that package for not sending patches upstream.