<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>34161</bug_id>
          
          <creation_ts>2017-11-09 13:51:47 +0300</creation_ts>
          <short_desc>separate %optfalgs which are bad for ./configure</short_desc>
          <delta_ts>2017-11-09 14:08:06 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>rpm-build</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>34162</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>arseny</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>167094</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2017-11-09 13:51:47 +0300</bug_when>
    <thetext>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 &quot;filter&quot; 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.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>