Non-mac build instructions

For reference, I have been doing some work on a new Clang webpage... and I have a question about something in the build instructions given here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-July/009817.html

Since Chris is only using a Mac, he was not exactly sure, so maybe someone else here can explain it in simple terms? :slight_smile:

In the instructions it talks about modifying line 606 in one of the files. Here's the quote:
"If you're not on a Mac, you'll need to make one change: paths to system header files are
currently hard coded into the tool. To get this to work for you, you'll probably have to change clang/Driver/clang.cpp:606 to include the paths that 'touch empty.c; gcc -v empty.c -fsyntax-only' prints
(it should list some lines after "#include <...> search starts here:")."

I would like to write that in a slightly easier to read manner, but I don't quite understand what it's saying. Here's what I have:
1. 'touch empty.c; gcc -v empty.c -fsyntax-only' to get the path.
2. change clang/Driver/clang.cpp:606 to include that path

Step 2 makes sense, but I'm not sure I wrote down step 1 correctly. Are you supposed to type 'touch empty.c; gcc -v empty.c -fsyntax-only' into the command-line, without the quotes) and it will give you the path information? Or are you supposed to type in something else into the command-line and it will give you the path info?

Also, can someone also confirm, that I did indeed understand step 2 correctly (want to make sure it's correct)?

"If you're not on a Mac, you'll need to make one change: paths to system
header files are currently hard coded into the tool. To get this to work
for you, you'll probably have to change clang/Driver/clang.cpp:606 to include
the paths that 'touch empty.c; gcc -v empty.c -fsyntax-only' prints
(it should list some lines after "#include <...> search starts here:")."

Obligatory sidenote, I had not have to make any changes when compiling on
FreeBSD and I doubt NetBSD or OpenBSD need any either.

Also, can someone also confirm, that I did indeed understand step 2 correctly
(want to make sure it's correct)?

Basically you need the path to the operating system's base header/include
files.

If you have GCC installed you can easily get the list of built-in paths, which
are supposed to be one of the saner things, by executing the 'touch empty.c &&
gcc -v empty.c -fsyntax-only' command.

The "..." and <...> mentions refer to include resolving as explained in 6.10.2
of c99.

In short:

<...> refers to a sequence of implementation-defined places to look for the
header. "..." refers to an implementation-defined manner, or failing that or
being absent, switches to what's used for <...>.