I'll take a look at this when I can. As you've noticed this set of code is fussy.<div><br></div><div>-eric</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 12:09 AM, Stepan Dyatkovskiy <span dir="ltr"><<a href="mailto:stpworld@narod.ru" target="_blank">stpworld@narod.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all.<br>
Sorry for latency. Not all good with CFLAGS passing to the Makefile.config.<br>
Configure script generates its own additions ("-g -O2") for CFLAGS, and these additions are not controlled by our <a href="http://configure.ac" target="_blank">configure.ac</a>. So even if you set up "--enable-optmized", it still does in its: it will build with debug symbols.<br>

Here as bug report that describes this issue:<br>
<a href="http://comments.gmane.org/gmane.comp.sysutils.autoconf.bugs/6227" target="_blank">http://comments.gmane.org/<u></u>gmane.comp.sysutils.autoconf.<u></u>bugs/6227</a><br>
<br>
To fix that issue, we need avoid playing with some system variables like a CFLAGS. If we want to setup flags independent from auto-tools logic, we need make their names unknown for tools like autoconf. I propose to use the next set of names:<br>

<br>
Customize flags for target compiler:<br>
CUSTOM_CFLAGS<br>
CUSTOM_CXXFLAGS<br>
CUSTOM_LDFLAGS<br>
<br>
Customize flags for build-platform compiler:<br>
CUSTOM_BUILD_CFLAGS<br>
CUSTOM_BUILD_CXXFLAGS<br>
CUSTOM_BUILD_LDFLAGS<br>
<br>
In <a href="http://Makefile.config.in" target="_blank">Makefile.config.in</a> these flags will added to the original ones, that are set up by environment (not configure script).<br>
<br>
The patch in the attachment contains appropriate changes.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Stepan.</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
Stepan Dyatkovskiy wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So... was that LGTM? Can I commit this patch?<br>
<br>
Andrew Trick wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Nov 13, 2012, at 2:19 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a><br>
<mailto:<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
FWIW c++11 can be done via configure flag, same with libc++ :)<br>
</blockquote>
<br>
Now you tell me...<br>
<br>
Anyway, our Makefile docs state that CXXFLAGS is a configure override,<br>
so this patch looks like a good fix to me.<br>
<br>
-Andy<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Nov 13, 2012 at 1:31 PM, Andrew Trick <<a href="mailto:atrick@apple.com" target="_blank">atrick@apple.com</a><br>
<mailto:<a href="mailto:atrick@apple.com" target="_blank">atrick@apple.com</a>>> wrote:<br>
<br>
    On Nov 7, 2012, at 8:16 PM, Stepan Dyatkovskiy <<a href="mailto:STPWORLD@narod.ru" target="_blank">STPWORLD@narod.ru</a><br>
    <mailto:<a href="mailto:STPWORLD@narod.ru" target="_blank">STPWORLD@narod.ru</a>>> wrote:<br>
<br>
    > Hi!<br>
    > CFLAGS and CXXFLAGS are not substituted in <a href="http://Makefile.config.in" target="_blank">Makefile.config.in</a><br>
    <<a href="http://makefile.config.in/" target="_blank">http://makefile.config.in/</a>>.<br>
    > Also it would be good to customize CFLAGS, CXXFLAGS and LDFLAGS<br>
    for build platform while doing cross-compilation.<br>
    > Please review the patch in attachment.<br>
    > -Stepan.<br>
<br>
    Thanks! This kept me from moving to c++11, which I have to do very<br>
    selectively.<br>
<br>
    I didn't try your cross-compiler options, but it seems simple<br>
enough.<br>
<br>
    -Andy<br>
<br>
    ______________________________<u></u>_________________<br>
    llvm-commits mailing list<br>
    <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a> <mailto:<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.<u></u>edu</a>><br>
    <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>