Why does libiconv get linked into jc1 on Solaris?
The Java front end requires iconv. If the compiler used to bootstrap GCC finds libiconv (because the GNU version of libiconv has been installed in the same prefix as the bootstrap compiler), but the newly built GCC does not find the library (because it will be installed with a different prefix), then a link-time error will occur when building jc1. This problem does not show up so often on platforms that have libiconv in a default location (like /usr/lib) because then both compilers can find a library named libiconv, even though it is a different library. Using –disable-nls at configure-time does not prevent this problem because jc1 uses iconv even in that case. Solutions include temporarily removing the GNU libiconv, copying it to a default location such as /usr/lib/, and using –enable-languages at configure-time to disable Java.