title: Can I change gcc default options without using command-line?
body: <p>I am plagued by the <a href="https://bugs.gentoo.org/show_bug.cgi?id=580414" rel="nofollow noreferrer">Gentoo bug #580414</a>.
  In short, the default options mislead <strong>configure</strong> into not detecting standard include files because some headers contain this code:</p>
  
  <pre><code>#if defined _FORTIFY_SOURCE &amp;&amp; _FORTIFY_SOURCE &gt; 0
  # if !defined __OPTIMIZE__ || __OPTIMIZE__ &lt;= 0
  #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
  </code></pre>
  
  <p>, and <strong>__OPTIMIZE__</strong> is off by default and  <strong>_FORTIFY_SOURCE</strong> is on by default, and the generated warning is perceived as an error, indicating that "stdint.h", "stdlib.h" and many others are absent. Compilation eventually fails and I cannot install programs or even upgrade the gcc itself.</p>
  
  <p>Can I simply put something in environment vars or in the /etc directory to turn on -O or turn off _FORTIFY_SOURCE for <strong>every</strong> invocation of gcc without editing gentoo build scripts?</p>
  
  <h2>Tried in /etc/portage/make.conf</h2>
  
  <pre><code>EPATCH_USER_EXCLUDE='*10_all_default-fortify-source*'
  CFLAGS="-O2 -O -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"
  CFLAGS_FOR_BUILD="-O2 -O -U_FORTIFY_SOURCE"
  </code></pre>
  
  <p>without any improvement.</p>