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 Thu, Oct 7, 2010 at 8:47 AM, Xianghua Xiao <xiaoxianghua@gmail.com> wrote: > On Thu, Oct 7, 2010 at 1:31 AM, Bryan Hundven <bryanhundven@gmail.com> wrote: >> On Tue, Oct 5, 2010 at 9:01 AM, Anthony Foiani <anthony.foiani@gmail.com> wrote: >>> On Mon, Oct 4, 2010 at 9:13 PM, Ralf Corsepius <rc040203@freenet.de> wrote: >>>> On 10/01/2010 10:47 PM, Anthony Foiani wrote: >>>>> The upshot is that the final cross-compiler looks in the wrong place >>>>> for c++ headers; it ends up looking in >>>>> >>>>> Â TARGET/lib/gcc/TARGET/4.5.1/include/ >>>>> Â TARGET/lib/gcc/TARGET/4.5.1/include-fixed/ >>>>> Â TARGET/TARGET/sys-root/usr/include/ >>>> >>>> These are the correct locations. >>>> >>>>> When it should be looking in: >>>>> >>>>> Â TARGET/TARGET/sys-root/usr/include/c++/4.5.1/ >>>> >>>> And this would be wrong. >> >> I don't understand. Could you kindly explain more about why this is wrong? >> >>> Ok, I think I see the reasoning behind this: things like "stdio.h" in >>> /usr/include are a part of libc, while the g++ headers are properly a >>> part of GCC itself. ÂOk. >>> >>> So how do I get libstdc++ installed into one of those proper search >>> directories? ÂHere's where they ended up: >>> >>> [tony@fedora12-64 xtools]$ find . -name '*stdc++*' -print >>> ./powerpc-e500v2-linux-gnuspe/sys-root/lib/libstdc++.so >>> ./powerpc-e500v2-linux-gnuspe/sys-root/lib/libstdc++.so.6.0.14 >>> ./powerpc-e500v2-linux-gnuspe/sys-root/lib/libstdc++.la >>> ./powerpc-e500v2-linux-gnuspe/sys-root/lib/libstdc++.so.6.0.14-gdb.py >>> ./powerpc-e500v2-linux-gnuspe/sys-root/lib/libstdc++.a >>> ./powerpc-e500v2-linux-gnuspe/sys-root/lib/libstdc++.so.6 >>> ./powerpc-e500v2-linux-gnuspe/sys-root/usr/include/c++/4.5.1/powerpc-e500v2-linux-gnuspe/bits/stdc++.h >>> >>> [tony@fedora12-64 xtools]$ find . -name 'iostream' -print >>> ./powerpc-e500v2-linux-gnuspe/sys-root/usr/include/c++/4.5.1/iostream >>> >>> Config file attached. >>> >>> Thanks, >>> Tony >>> >>> -- >>> For unsubscribe information see http://sourceware.org/lists.html#faq >>> >> >> I have the same issue on a ppc (e500v2), and armeb (armv5te), and this >> x86 toolchain built with crosstool-ng (gcc-4.5.1, eglibc-trunk). >> >> g++test.cpp: >> ----------------------8<--------------------- >> #include <iostream> >> using namespace std; >> int main( int argc, char **argv ) >> { >> Â Âcout << "Hello World" << endl; >> Â Âreturn 0; >> } >> ----------------------8<--------------------- >> >> $ /home/bryan/x-tools/i686-nptl-linux-gnu/bin/i686-nptl-linux-gnu-g++ >> -o g++test g++test.cpp >> g++test.cpp:1:20: fatal error: iostream: No such file or directory >> compilation terminated. >> >> $ /home/bryan/x-tools/i686-nptl-linux-gnu/bin/i686-nptl-linux-gnu-gcc >> -print-search-dirs >> install: /home/bryan/x-tools/i686-nptl-linux-gnu/lib/gcc/i686-nptl-linux-gnu/4.5.1/ >> programs: =/home/bryan/x-tools/i686-nptl-linux-gnu/libexec/gcc/i686-nptl-linux-gnu/4.5.1/:/home/bryan/x-tools/i686-nptl-linux-gnu/libexec/gcc/i686-nptl-linux-gnu/4.5.1/:/home/bryan/x-tools/i686-nptl-linux-gnu/libexec/gcc/i686-nptl-linux-gnu/:/home/bryan/x-tools/i686-nptl-linux-gnu/lib/gcc/i686-nptl-linux-gnu/4.5.1/:/home/bryan/x-tools/i686-nptl-linux-gnu/lib/gcc/i686-nptl-linux-gnu/:/home/bryan/x-tools/i686-nptl-linux-gnu/lib/gcc/i686-nptl-linux-gnu/4.5.1/../../../../i686-nptl-linux-gnu/bin/i686-nptl-linux-gnu/4.5.1/:/home/bryan/x-tools/i686-nptl-linux-gnu/lib/gcc/i686-nptl-linux-gnu/4.5.1/../../../../i686-nptl-linux-gnu/bin/ >> libraries: =/home/bryan/x-tools/i686-nptl-linux-gnu/lib/gcc/i686-nptl-linux-gnu/4.5.1/:/home/bryan/x-tools/i686-nptl-linux-gnu/lib/gcc/i686-nptl-linux-gnu/4.5.1/../../../../i686-nptl-linux-gnu/lib/i686-nptl-linux-gnu/4.5.1/:/home/bryan/x-tools/i686-nptl-linux-gnu/lib/gcc/i686-nptl-linux-gnu/4.5.1/../../../../i686-nptl-linux-gnu/lib/:/home/bryan/x-tools/i686-nptl-linux-gnu/i686-nptl-linux-gnu//sys-root/lib/i686-nptl-linux-gnu/4.5.1/:/home/bryan/x-tools/i686-nptl-linux-gnu/i686-nptl-linux-gnu//sys-root/lib/:/home/bryan/x-tools/i686-nptl-linux-gnu/i686-nptl-linux-gnu//sys-root/usr/lib/i686-nptl-linux-gnu/4.5.1/:/home/bryan/x-tools/i686-nptl-linux-gnu/i686-nptl-linux-gnu//sys-root/usr/lib/ >> >> >> I attached my x86.config and output of -dumpspecs >> >> --Bryan >> >> -- >> For unsubscribe information see http://sourceware.org/lists.html#faq >> > print-seach-dir is really for binaries and libraries, for header files, 'g++ -v' and see wherever its with-sysroot(or with-cxx-include-dir) is located, i found iostream under usr/include/c++ just fine with crosstool-ng 1.8.1 for both x86 and powerpc installations. xianghua -- 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] |