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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
max
Member
Member
Posts: 616
Joined: Mon Mar 05, 2012 11:23 am
Libera.chat IRC: maxdev
Location: Germany
Contact:

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

Post 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
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

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

Post 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?
Developer of tyndur - community OS of Lowlevel (German)
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

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

Post 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.
Post Reply