Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 10105

Summary: Use optflags to set CXXFLAGS for C++ compiles.
Product: [Retired] Red Hat Linux Reporter: Sam Varshavchik <mrsam>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

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.