This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 07 December 2006 12:36, Mike Frysinger wrote:Well I wanted to use gcc or possibly g++ myself, but then someone said that it couldn't be done, and I had to use cpp instead...
On Thursday 07 December 2006 03:36, Toralf Lund wrote:
Is there any way I can get gcc to tell me where the "normal" includeif you run `echo "" | cpp -v` it'll tell you the include search paths ...
directory is located? I mean, for my system's native compiler, this
directory is "/usr/include", while on e.g. my arm-coff cross-gcc, it's
"/usr/arm-coff/include". Is there any way to ask the compilers to print
out these values? If not, how about the full "built-in" include path?
not sure how to get that in an easier format though
-mike
Sorry, I've been following this thread but I just don't follow :) Why are
we asking the preprocessor about include paths? Only the compiler knows.
Anyhow, I must admin that I had overlooked the fact that gcc -v when used in combination with -E, will also include the search path (and not just version/configure info and program names.)After all it's language dependent; the output from "gcc -v" shows the include paths for C, the output from "g++ -v" shows the include paths for C++. If your problem is how to find the standard system include dir, this seems to work for me:
mkdir -p LOOK_HERE_FOR_SYSTEM_DIR && gcc -v -E - </dev/null >/dev/null -isystem LOOK_HERE_FOR_SYSTEM_DIR |
grep -A1 LOOK_HERE_FOR_SYSTEM_DIR | tail -1
-- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |