[cfe-dev] Ubuntu install location fixes

Gonsolo gonsolo at gmail.com
Mon Mar 1 12:08:50 PST 2010


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Automatically-determine-c-include-paths.patch
Type: text/x-patch
Size: 1703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100301/e70582eb/attachment.bin>


More information about the cfe-dev mailing list