Bug 34161 - separate %optfalgs which are bad for ./configure
Summary: separate %optfalgs which are bad for ./configure
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: rpm-build (show other bugs)
Version: unstable
Hardware: all Linux
: P3 enhancement
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
Depends on: 34162
  Show dependency tree
Reported: 2017-11-09 13:51 MSK by Ivan Zakharyaschev
Modified: 2017-11-09 14:08 MSK (History)
7 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
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.)