Hello, I am trying to build a GCC 4.2.4 cross compiler targeted for sparc-sun-solaris2.10 and hosted on x86_64-unknown-linux-gnu. The compiler is configured with: --target=sparc-sun-solaris2.10\ --disable-nls \ --enable-shared \ --enable-debug \ --enable-threads=posix \ --enable-__cxa_atexitx \ --enable-long-long \ --with-gcc \ --with-gnu-as \ --with-gnu-ld \ --with-stabs \ --enable-interwork \ --with-headers=/home/dva/xcompile/sparc-sun-solaris2.10/include \ --with-libs=/home/dva/xcompile/sparc-sun-solaris2.10/lib \ --enable-languages=c,c++ \ --enable-libgcc-rebuild \ --prefix=/usr/local
When (as root) I am executing make install I get the following errors: make[3]: Leaving directory `/home/dva/xcompile/build/gcc-4.2.4/libiberty/testsuite' /bin/sh /home/dva/xcompile/src/gcc-4.2.4/libiberty/../mkinstalldirs /usr/local/lib/`gcc -g -O2 -print-multi-os-directory` /usr/bin/install -c -m 644 ./libiberty.a /usr/local/lib/`gcc -g -O2 -print-multi-os-directory`/./libiberty.an ( cd /usr/local/lib/`gcc -g -O2 -print-multi-os-directory` ; chmod 644 ./libiberty.an ;ranlib ./libiberty.an ) mv -f /usr/local/lib/`gcc -g -O2 -print-multi-os-directory`/./libiberty.an /usr/local/lib/`gcc -g -O2 -print-multi-os-directory`/./libiberty.a if test -n ""; then \ case "" in \ /*) thd=;; \ *) thd=/usr/local/include/;; \ esac; \ /bin/sh /home/dva/xcompile/src/gcc-4.2.4/libiberty/../mkinstalldirs ${thd}; \ for h in /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/ansidecl.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/demangle.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/dyn-string.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/fibheap.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/floatformat.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/hashtab.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/libiberty.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/objalloc.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/partition.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/safe-ctype.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/sort.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/splay-tree.h /home/dva/xcompile/src/gcc-4.2.4/libiberty/../include/ternary.h; do \ /usr/bin/install -c -m 644 $h ${thd}; \ done; \ fi make[3]: Entering directory `/home/dva/xcompile/build/gcc-4.2.4/libiberty/testsuite' make[3]: Nothing to be done for `install'. make[3]: Leaving directory `/home/dva/xcompile/build/gcc-4.2.4/libiberty/testsuite' make[2]: Leaving directory `/home/dva/xcompile/build/gcc-4.2.4/libiberty' /bin/sh: line 3: cd: sparc-sun-solaris2.10/libstdc++-v3: No such file or directory make[1]: *** [install-target-libstdc++-v3] Error 1 make[1]: Leaving directory `/home/dva/xcompile/build/gcc-4.2.4' make: *** [install] Error 2 However, both gcc and g++ were installed. Gcc works okay and produce the sparc binaries but g++ gives the following error when compiling: d...@dl380tm01:~$ export CXX=sparcv9-sun-solaris2.10-g++ d...@dl380tm01:~$ $CXX main.c -o main -Wl,--rpath -Wl,/usr/local/sparc-sun-solaris2.10/lib/ /usr/local/lib/gcc/sparcv9-sun-solaris2.10/4.2.4/../../../../sparcv9-sun-sol aris2.10/bin/ld: cannot find -lstdc++ collect2: ld returned 1 exit status My questions are: 1. How can I generate and install libstdcxx? 2. Is there any tweak to be done on the linker (apart from LD_RUN_PATH, -L and the above options)? Regards, Daniel