Bug 174812 - optflags contain deprecated -mcpu compiler flag
optflags contain deprecated -mcpu compiler flag
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
5
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-02 09:03 EST by Ansgar Esztermann
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-12-02 21:43:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 09:08 EST, Ansgar Esztermann
no flags Details | Diff

  None (edit)
Description Ansgar Esztermann 2005-12-02 09:03:17 EST
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 09:08:50 EST
Created attachment 121753 [details]
proposed patch

use -mtune=i686 rather than deprecated -mcpu=i686
Comment 2 Ansgar Esztermann 2005-12-02 09:18:14 EST
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-02 21:43:47 EST
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.