Page 1 of 1

How to get libstdc++-v3 installed to the SYSROOT?

Posted: Thu Mar 19, 2015 2:29 am
by max
Hey guys,

I'm building my toolchain as described here: http://ghostkernel.org/documentation/toolchain

I'm telling gcc to build with a sysroot when I configure it, the sysroot is used by the created compiler for lookup and it works well with the C library & Ghost-API installed there, but the problem is that libstdc++-v3 always ends up in /ghost/i686-ghost/ instead of /ghost/sysroot/usr/.

How do I have to ./configure gcc so it installs it into the sysroot?

Greets,
Max

Re: How to get libstdc++-v3 installed to the SYSROOT?

Posted: Thu Mar 19, 2015 5:21 am
by Kevin
The tyndur build script uses an older GCC version, but we just set DESTDIR for make install and no --with-sysroot at all (the latter doesn't even seem to exist in this version). The documentation seems to suggest that --with-sysroot only influences the default options of the built compiler, but not the installation target, so maybe DESTDIR is worth a try?

Re: How to get libstdc++-v3 installed to the SYSROOT?

Posted: Fri Mar 20, 2015 5:22 am
by sortie
It's because libstdc++ is part of the compiler rather than a real standalone system library. It's installed into the compiler directory rather than the sysroot. You are supposed to cross-compile it to your OS when you cross-compile the compiler (to get a native compiler).

Naturally, I reject this. I have a script that detaches libstdc++ from the gcc tree and produce a stand-alone libstdc++ tree that can be bullt separately and behaves normally.