libstdc++: Use LTLIBICONV when linking libstdc++.so [PR93602]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 13 Apr 2022 13:09:33 +0000 (14:09 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 20 Apr 2022 12:54:57 +0000 (13:54 +0100)
commitc644b7df11afc818d6308c3776813e50e4ebe551
treece0877355aee3a36bc2823d551d6517e1c4d35a7
parent4d4eaa77a7d27bf7b220c3be79615410c873fcf1
libstdc++: Use LTLIBICONV when linking libstdc++.so [PR93602]

This fixes missing libiconv symbols when libstdc++ is built on a system
that has libiconv installed. If the libiconv headers are found then
libstdc++ depends on libiconv_open etc instead of libc's iconv_open. But
without this fix libstdc++ is not linked to the libiconv library that
provides the definitions of those symbols.

As discussed in PR 93602 this changed means that libstdc++.so.6 might
have an rpath pointing to the location of the libiconv.so library. If
that is not desired, then GCC must be configured to link to a static
libiconv.a instead, using either --with-libiconv-type=static or an
in-tree build of libiconv.

libstdc++-v3/ChangeLog:

PR libstdc++/93602
* doc/xml/manual/prerequisites.xml: Document libiconv
workarounds.
* doc/html/manual/setup.html: Regenerate.
* src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
* src/Makefile.in: Regenerate.
libstdc++-v3/doc/html/manual/setup.html
libstdc++-v3/doc/xml/manual/prerequisites.xml
libstdc++-v3/src/Makefile.am
libstdc++-v3/src/Makefile.in