Bug 10105 - Use optflags to set CXXFLAGS for C++ compiles.
Summary: Use optflags to set CXXFLAGS for C++ compiles.
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 6.2
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-03-10 04:39 UTC by Sam Varshavchik
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-03-10 04:39:44 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Sam Varshavchik 2000-03-10 04:39:44 UTC
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 14:03:41 UTC
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.