]> git.ipfire.org Git - thirdparty/gcc.git/commit
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>
Mon, 9 May 2022 15:04:35 +0000 (16:04 +0100)
commit8da8ed881e7cdb2d4b070d685d6d3fe8d31529c2
treeb7575b6ed17e246742d4a7b9c7b62babdabb3504
parentf3a0d3a778643bcb82bdf41a67a5ddc1f95c6f53
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.

(cherry picked from commit c644b7df11afc818d6308c3776813e50e4ebe551)
libstdc++-v3/doc/html/manual/setup.html
libstdc++-v3/doc/xml/manual/prerequisites.xml
libstdc++-v3/src/Makefile.am
libstdc++-v3/src/Makefile.in