<p>Isn&#39;t there a --cflags-only-I or something along those lines?</p>
<p>Sending from a mobile, pardon the brevity. ~ C.</p>
<p>On Dec 6, 2010 9:42 AM, &quot;Dan Nicholson&quot; &lt;<a href="mailto:dbn.lists@gmail.com">dbn.lists@gmail.com</a>&gt; wrote:<br type="attribution">&gt; On Mon, Dec 6, 2010 at 9:15 AM, Brian Paul &lt;<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>&gt; wrote:<br>
&gt;&gt; On 12/05/2010 02:06 AM, Bob Gleitsmann wrote:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Hello,<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Can someone explain the value of including this in<br>&gt;&gt;&gt; mesa/src/gallium/Makefile.template:<br>
&gt;&gt;&gt;<br>&gt;&gt;&gt; ifeq ($(MESA_LLVM),1)<br>&gt;&gt;&gt; LIBRARY_DEFINES += $(LLVM_CFLAGS)<br>&gt;&gt;&gt; endif<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; ?<br>&gt;&gt;&gt; This effectively adds the LLVM cflags to gcc compiles if LLVM is enabled.<br>
&gt;&gt;&gt; One<br>&gt;&gt;&gt; side-effect of this is to include -O3 optimization no matter what, making<br>&gt;&gt;&gt; debugging very difficult. Removing it seems to have no catastrophic<br>&gt;&gt;&gt; effects (or<br>
&gt;&gt;&gt; even detectable ones).<br>&gt;&gt;&gt; But maybe I am missing something.<br>&gt;&gt;<br>&gt;&gt; We need some of the LLVM C flags to get the -I path for headers, for<br>&gt;&gt; example.<br>&gt;&gt;<br>&gt;&gt; I think we should use llvm-config --cppflags instead of --cflags.<br>
&gt;&gt;<br>&gt;&gt; If you&#39;re using autoconf, try changing this line:<br>&gt;&gt;<br>&gt;&gt;        LLVM_CFLAGS=`$LLVM_CONFIG --cflags`<br>&gt;&gt;<br>&gt;&gt; in <a href="http://configure.ac">configure.ac</a> to use --cppflags instead.  Does that help?<br>
&gt; <br>&gt; I think the question is, what else is in llvm-config --cflags? If all<br>&gt; that&#39;s needed is the include paths, then --cppflags would be<br>&gt; sufficient. However, if there are macro definitions or compiler flags<br>
&gt; (e.g. -fomit-frame-pointer) in --cflags that are needed to properly<br>&gt; use llvm, then I guess you need --cflags. This is really a bug in<br>&gt; llvm, but the last time someone here tried to bring it up to the llvm<br>
&gt; people, it was dismissed. Here&#39;s that bug:<br>&gt; <br>&gt; <a href="http://llvm.org/bugs/show_bug.cgi?id=8220">http://llvm.org/bugs/show_bug.cgi?id=8220</a><br>&gt; <br>&gt; There&#39;s some more in the mesa archives, but I can&#39;t find the thread<br>
&gt; now. Sadly, that bug became a discussion about pkg-config which was<br>&gt; not what was intended.<br>&gt; <br>&gt; --<br>&gt; Dan<br>&gt; _______________________________________________<br>&gt; mesa-dev mailing list<br>
&gt; <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>&gt; <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>