Bug 34161

Summary: separate %optfalgs which are bad for ./configure
Product: Sisyphus Reporter: Ivan Zakharyaschev <imz>
Component: rpm-buildAssignee: placeholder <placeholder>
Status: NEW --- QA Contact: qa-sisyphus
Severity: enhancement    
Priority: P3 CC: at, glebfm, imz, ldv, mike, placeholder, vt
Version: unstable   
Hardware: all   
OS: Linux   
Bug Depends on: 34162    
Bug Blocks:    

Description Ivan Zakharyaschev 2017-11-09 13:51:47 MSK

Some C compiler flags (CFLAGS) are desired for compilation, but not when running ./configure (or similar scripts).

Now CFLAGS et al. environment variables are set and exported by %configure.


1. Optimization flags may be unwanted in ./configure because they slow down the tests. (Instead, something like -O0 may be wanted if this is not the default.)

2. -Werror (added to %optflags by %def_enable Werror or by other ways) make the tests in ./configure behave differently.

A mechanism should be thought up to "filter" out the flags which are bad for ./configure before running ./configure, but to add them back when running make.

Perhaps, exporting CFLAGS two times (with different values) would work for most packages, but I need a closer look at the packages to find this out.

(A BRP check that would check that the resulting files have been compiles with flags which include all %optflags would help to see whether the new mechanism would work as expected en masse.)