On Mon, 1 Mar 2010, DJ Delorie wrote: > > But I've previously noted that target libiberty seems completely useless; > > It's a target library, like newlib, libz, libstdc++, or anything else. > How do you know there are no target applications that want to link > against it?
GCC target libraries provide either functions to which GCC may implicitly generate calls, or the customary runtime for languages and language extensions implemented by GCC. libiberty provides a random selection of other functions used in various host-side tools; as such, it should not be installed for the target by GCC. (In my view it should not be installed for the host either; from GCC's perspective it's just an internal piece of the implementation. The associated headers are only installed if anywhere in the plugin include directory, which would indicate that if libiberty is installed anywhere it should also be a clearly version-specific plugin-specific directory. But I think we concluded that it would be best to link the whole of libiberty.a into the cc1 etc. binaries to provide a stable interface for plugins, which indicates no need to install libiberty.a for them.) GCC target libraries use GPL+exception; newlib uses various permissive licenses. libiberty has a mixture of GPL and LGPL, which are generally considered unsuitable for GCC target libraries and for newlib, plus some files with exceptions. The question is not whether some target applications want to use it - it is whether it is a facility that GCC should be providing to target (or host) applications, and I think it is not. An application wanting to use it can always build its own copy of libiberty, just like GCC does; building libiberty at application build time is what GCC, Binutils, GDB etc. do and I think is what other applications should do (subject to e.g. --enable-install-libbfd also causing Binutils to install host libiberty as a dependency of host libbfd). (I would also note that libiberty is rather specialized to the particular toolchain uses it has on the host side, and random pieces of software might be better off using gnulib which provides a larger and more general-purpose collection of miscellaneous utility and portability functions.) -- Joseph S. Myers jos...@codesourcery.com