Toolchains, cross-toolchains, and libstdc++ dependencies

This page covers issues and possible solutions around the subject of libstdc++ being closely coupled to the gcc/g++ sources. This primarily affects cross-compiler builds and the use of alternate compilers such as clang.

Issues

1) clang can't install c++ headers without also installing g++, because libstdc++6-4.*-dev depends on g++-4.*. This makes clang effectively depend on g++, which it doesn't need or want.

2) libstdc++6-4.*-dev is not multiarch:same so g++-<triplet> can't install c++ headers for arch <triplet> using multiarch, because they are not co-installable with the native version of libstdc++6-4.*-dev

Packages which build-depend on libstdc++(-dev)

Packages which build-depend on libstdc++

Package: aghermann
Package: balder2d
Package: golly
Package: nsis
Package: nxcl
Package: pkcs11-dump
Package: shotdetect
Package: socnetv
Package: aghermann
Package: balder2d
Package: golly
Package: nsis
Package: nxcl
Package: pkcs11-dump
Package: shotdetect
Package: socnetv

Packages which build-depend on libstdc++-dev:

Package: nxcl
Package: pkcs11-dump
Package: shotdetect
Package: socnetv
Package: nxcl
Package: pkcs11-dump
Package: shotdetect
Package: socnetv

DebConf12 BoF minutes

Preventing another copy of the same headers for each architecture for which a cross-compiler is needed.

Matthias also wants binaries to be moved to /usr/libexec instead of being in the gcc directory

So Someone needs to do the split and check it works for the native compiler still.

Need libgcc-4.7-dev, libgobjc-4.7-dev and libstdc++6-4.7-dev independently installed from gcc all .a, .h, and .so* files which are currently in gcc, gfortran or gobjc need to move into lib*-$version-dev packages. The gobjective C multilib libraries become pure dependency packages. gobjc++-4.7-multilib

gobjc-4.7-multilib

No c++ library should be linked to libc++ (the LLVM C++ implementation) Set /usr/bin/cc & /usr/bin/c++ explicitly and remove assumptions that this is gcc to increase support for clang and gcc-$triplet. Need more exact details of the work to be done - wookey & Thibg. List of files for which packages etc. Probably add another 20-25 binary packages built from gcc source.

proposed gcc packaging changes (cross and native)

Please avoid adding cross-architecture build dependencies for the native gcc packages. gcc and glibc still should be built using the multilib approach.