From 3a49e2c1a627a1240919439bb1b52005e260e099 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sat, 18 Apr 2020 00:34:20 +0100 Subject: Properly adding libiconv to the libraries that libstdc++ links with Of the GCC dynamically linked libraries we need to manually add RPATH to all and for `libstdc++' we also need to tell it to link with `libiconv'. Until now, the conditional to check for libstdc++ was not working and thus libiconv wasn't been added to it. With this commit the conditional has been corrected and is now working. Also, to help in reading the logs, an echo statement was added after every call to PatchELF. --- reproduce/software/make/basic.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'reproduce/software') diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 19f5500..d1fbc3f 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -1330,8 +1330,11 @@ $(ibidir)/gcc: | $(ibidir)/binutils \ if [ x"$$isdynamic" != x ]; then \ cp $$f $$tempname; \ patchelf --set-rpath $(ildir) $$tempname; \ - if [ "$$f" = $(ildir)/libstdc++.so ]; then \ + echo "$$f: added rpath"; \ + islibcpp=$$(echo $$f | grep "libstdc++"); \ + if [ x"$$islibcpp" != x ]; then \ patchelf --add-needed $(ildir)/libiconv.so $$tempname; \ + echo "$$f: linked with libiconv"; \ fi; \ mv $$tempname $$f; \ fi; \ -- cgit v1.2.1