Bug 174812 - optflags contain deprecated -mcpu compiler flag
Summary: optflags contain deprecated -mcpu compiler flag
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
(Show other bugs)
Version: 5
Hardware: i386 Linux
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2005-12-02 14:03 UTC by Ansgar Esztermann
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-12-03 02:43:47 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch (483 bytes, patch)
2005-12-02 14:08 UTC, Ansgar Esztermann
no flags Details | Diff

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):

How reproducible:

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.

Note You need to log in before you can comment on or make changes to this bug.