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