[cfe-dev] Ubuntu install location fixes

Diego Iastrubni diegoiast at gmail.com
Tue Mar 2 04:56:10 PST 2010


Hi Gonosolo,

What happens when you change the compiler on your system? The clang will
fail again to find the correct includes. IMHO, the real solution is to find
the path in runtime not in compile time.


On Mon, Mar 1, 2010 at 10:08 PM, Gonsolo <gonsolo at gmail.com> wrote:

> Attached is a patch for automatical determination of c++ include paths.
> CXX_INCLUDE_ROOT and CXX_INCLUDE_ARCH can be set manually or otherwise are
> determined from the host system.
> It works by looking at /usr/include/c++ and using the latest revision.
> Then it looks for a list of files in that directory like i486-linux-gnu and
> uses the first existing one.
> This patch is for the cmake build system only.
> It is aimed to replace he hardcoded paths in clang's
> lib/Frontend/InitHeaderSearch.cpp.
>
> This patch is tested with Ubuntu 9.10. It correctly guesses
> /usr/include/c++/4.4.1 and i486-linux-gnu on my system. After that clang
> doesn't abort with "cannot find bits/c++config.h" anymore.
>
> The list of directories only has 3 entries right now, it has to be expanded
> for all the other systems.
>
> g
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100302/c029fc01/attachment.html>


More information about the cfe-dev mailing list