Bug 908096 - libev build doesn't respect $RPM_OPT_FLAGS
libev build doesn't respect $RPM_OPT_FLAGS
Product: Fedora
Classification: Fedora
Component: libev (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Mathieu Bridon
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-02-05 16:14 EST by Nalin Dahyabhai
Modified: 2013-02-08 10:28 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-08 05:08:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nalin Dahyabhai 2013-02-05 16:14:38 EST
Description of problem:
When building libev, the build log shows that it's using CFLAGS set to "-g -O3" rather than the ones provided by RPM.

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

How reproducible:

Steps to Reproduce:
1. rpmbuild --rebuild libev-4.11-1.fc19.src.rpm
Additional info:
It's not the most elegant workaround, but adding 'CFLAGS="$RPM_OPT_FLAGS"' to the command line for 'make' should do the trick.  To avoid warnings due to violating strict aliasing rules, a '-fno-strict-aliasing' would probably need to be added to turn off strict aliasing.
Comment 1 Mathieu Bridon 2013-02-08 05:08:25 EST
Thanks for the bug report Nalin.

Looking at configure.ac, I see this:

    [... snip ...]
    dnl Supply default CFLAGS, if not specified
    if test -z "$orig_CFLAGS"; then
      if test x$GCC = xyes; then
        CFLAGS="-g -O3"

But looking at the configure script, the orig_CFLAGS="..." line isn't there.

The problem is that this line needs to be after AC_INIT, but before AC_PROG_CC
(thanks emias in #schmorpforge for the help)

I committed the patch to the Rawhide package and rebuilt, see the build.log:

I'll try submitting all the Fedora patches upstream though.
Comment 2 Nalin Dahyabhai 2013-02-08 10:28:21 EST

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