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] |
i'm sure i'm about to embarrass myself here but what is the appropriate include directory search path for the generated cross compiler?
Headers will be used by the "C Pre Processor", 'cpp', so the only one which could tell where it searches those headers could be the 'cpp'. The other GCC binaries maybe don't care where the headers are.
and how can i print out where a header file would be found? i tried the "-print-search-dirs"
but, while that prints the search sequence for shared libs, it doesn't say anything about how a given header file would be located.
One should be like a child with these things :-) Trying everything and seeing what happens, can sometimes teach a lot. For instance one has learned the '-v' option with 'gcc' and wants to see what it gives with the other GCC binaries. It can for instance give the following :
F:\usr\local\lib\gcc-lib\sh-linux-gnu\3.0>cpp0 -v GNU CPP version 3.0 20010416 (prerelease) (cpplib) (SH GNU/Linux with ELF) #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/local/lib/gcc-lib/sh-linux-gnu/3.0/include /usr/local/sh-linux-gnu/sys-include /usr/local/sh-linux-gnu/include End of search list. cpp0: is a block device
F:\usr\local\lib\gcc-lib\sh-linux-gnu\3.0>cc1 -v GNU CPP version 3.0 20010416 (prerelease) (cpplib) (SH GNU/Linux with ELF) .file "stdin" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/local/lib/gcc-lib/sh-linux-gnu/3.0/include /usr/local/sh-linux-gnu/sys-include /usr/local/sh-linux-gnu/include End of search list. cc1: is a block device .ident "GCC: (GNU) 3.0 20010416 (prerelease)"
Execution times (seconds) preprocessing : 0.00 ( 0%) usr lexical analysis : 0.00 ( 0%) usr parser : 0.09 (53%) usr varconst : 0.00 ( 0%) usr symout : 0.00 ( 0%) usr TOTAL : 0.17
BTW, the last rows were interesting... Maybe some day someone asks how one can see how long times the 'compiler' will spend in its 'compile phases' !
As seen, the '-v' doesn't say much about the C++ headers... Hmmm, what else nice options there could be. Needing help... Is there an option giving help? What if one writes 'help' as the option? GNU tools require two dashes with a 'long' option, so the option could be '--help' or how?
F:\usr\local\lib\gcc-lib\sh-linux-gnu\3.0>cpp0 -v -lang-c++ GNU CPP version 3.0 20010416 (prerelease) (cpplib) (SH GNU/Linux with ELF) ignoring nonexistent directory "/usr/local/include/g++-v3/sh-linux-gnu" #include "..." search starts here: #include <...> search starts here: /usr/local/include/g++-v3 /usr/local/include /usr/local/lib/gcc-lib/sh-linux-gnu/3.0/include /usr/local/sh-linux-gnu/sys-include /usr/local/sh-linux-gnu/include End of search list. cpp0: is a block device
i'm sure this is trivial stuff, i'm just realizing that maybe i don't understand it as well as i should.
Ok, jokes enough... Seeing the headers search paths seems to not be standardized in any way, so if one has learned to use the :
F:\usr\local\bin>cpp-sh-linux-b -Wp,-lang-c++,-v GNU CPP version 3.0 20010416 (prerelease) (cpplib) (SH GNU/Linux with ELF) ignoring nonexistent directory "f:/usr/local/include/g++-v3/sh-linux-gnu" ignoring nonexistent directory "/usr/local/include/g++-v3/sh-linux-gnu" #include "..." search starts here: #include <...> search starts here: f:/usr/local/include/g++-v3 f:/usr/local/lib/gcc-lib/sh-linux-gnu/3.0/include f:/usr/local/sh-linux-gnu/sys-include f:/usr/local/sh-linux-gnu/include /usr/local/include/g++-v3 /usr/local/include /usr/local/lib/gcc-lib/sh-linux-gnu/3.0/include /usr/local/sh-linux-gnu/sys-include /usr/local/sh-linux-gnu/include End of search list. cpp0.exe: is a block device
Generally I don't know where people will need the '$target-cpp' which will be installed always, into the same place with the '$target-gcc', '$target-g++' etc. But now we know at least one use for that: to try to see the headers search paths...
F:\usr\local\bin>cpp-sh-linux-b -print-search-dirs install: /usr/local/lib/gcc-lib/sh-linux-gnu\3.0\ programs: =f:\usr\local\lib\gcc-lib\sh-linux-gnu\3.0\;
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |