Bug 10105 - Use optflags to set CXXFLAGS for C++ compiles.
Use optflags to set CXXFLAGS for C++ compiles.
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2000-03-09 23:39 EST by Sam Varshavchik
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-03-09 23:39:44 EST
Type: ---
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 Sam Varshavchik 2000-03-09 23:39:44 EST
optflags is currently not being used for C++ compiles.  I think it should.

/usr/lib/rpm/macros currently reads:

%configure      \
  %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \
  CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix}

The problem is that automake does NOT use CFLAGS in the default rule for
C++ compiles, it uses CXXFLAGS.  I suggest that %configure should be
changed to read as follows:

%configure      \
  %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \
  CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" \
  ./configure %{_target_platform} --prefix=%{_prefix}
Comment 1 Jeff Johnson 2000-07-21 10:03:41 EDT
Fixed (by setting CXXFLAGS in %configure) in rpm-3.05 and rpm-4.0.

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