Bug 34161 - separate %optfalgs which are bad for ./configure
: separate %optfalgs which are bad for ./configure
Status: NEW
: Sisyphus
(All bugs in Sisyphus/rpm-build)
: unstable
: all Linux
: P3 enhancement
Assigned To:
:
:
:
: 34162
:
  Show dependency tree
 
Reported: 2017-11-09 13:51 by
Modified: 2017-11-09 14:08 (History)


Attachments


Note

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


Description From 2017-11-09 13:51:47
4.0.4-alt105

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.

Examples:

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.)