diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-07-31 17:11:08 +0100 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-07-31 17:11:08 +0100 |
commit | 704fffcfb11d1b41e276bbb52624c393ff7e4428 (patch) | |
tree | 7de585a7afcf57627460976eb0b7085f869714dc /reproduce/software/make | |
parent | 2baf058dcf323aa07f6d5dd3214982e7fccac3da (diff) |
GCC: libstdc++ has a link to libiconv
After adding the libiconv library to the template, the C++ library uses
three of its functions (`libiconv', `libiconv_open' and
`libiconv_close'). However, it doesn't explicity link with it inside its
shared library!
I tried by exporting `LIBS=-liconv' before the GCC configure script but it
crashed as soon as it went on to the second GCC building stage (because
this environment variable was no longer present there). I also tried adding
the C++ configure option of `--enable-cstdio' to the GCC configure options
(so it doesn't use iconv according to the manual), but it made no change.
With this commit, as a brute-force solution, `patchelf --add-needed' is run
on the installed `libstdc++.so', so `libiconv.so' is explicitly included
inside the `libstdc++' shared library.
This bug was found by Roberto Baena Galle while trying to load Matplotlib
(which needed the C++ library).
This fixes bug #56702.
Diffstat (limited to 'reproduce/software/make')
-rw-r--r-- | reproduce/software/make/basic.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 98aea0d..fc28683 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -1180,6 +1180,7 @@ $(ibidir)/gcc: $(gcc-tarball) \ && cd ../.. \ && rm -rf gcc-$(gcc-version) \ && if [ "x$(on_mac_os)" != xyes ]; then \ + patchelf --add-needed $(ildir)/libiconv.so $(ildir)/libstdc++.so; \ for f in $$(find $(idir)/libexec/gcc) $(ildir)/libstdc++*; do \ if ldd $$f &> /dev/null; then \ patchelf --set-rpath $(ildir) $$f; \ |