From bc49a299fb2c64d9c26dd7bf3682bc79800cb6a3 Mon Sep 17 00:00:00 2001
From: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Date: Mon, 8 Jul 2019 00:03:49 +0100
Subject: Rpath in libstdc++ and passing host_cc to high-level

Until this commit, the addion of `-liconv' to `CXXFLAGS' in `high-level.mk'
dependend on `host_cc', but I had forgot that `host_cc' isn't defined for
`high-level.mk'. It is now defined for this Makefile also in the configure
script.

Also, the Standard C++ library depends on `libgcc_s.so.1', so after
building GCC, it was necessary to add Rpath to it.
---
 .file-metadata                   | Bin 6106 -> 6106 bytes
 configure                        |   3 ++-
 reproduce/software/make/basic.mk |   2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.file-metadata b/.file-metadata
index f6752a5..48b34a6 100644
Binary files a/.file-metadata and b/.file-metadata differ
diff --git a/configure b/configure
index 61e8469..6bf62b3 100755
--- a/configure
+++ b/configure
@@ -1139,8 +1139,9 @@ fi
 ./.local/bin/make -f reproduce/software/make/high-level.mk \
                   rpath_command=$rpath_command \
                   static_build=$static_build \
-                  on_mac_os=$on_mac_os \
                   numthreads=$numthreads \
+                  on_mac_os=$on_mac_os \
+                  host_cc=$host_cc \
                   -j$numthreads
 
 
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index bbeb13d..5535019 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -1153,7 +1153,7 @@ $(ibidir)/gcc: $(gcc-tarball) \
 	  && cd ../.. \
 	  && rm -rf gcc-$(gcc-version) \
 	  && if [ "x$(on_mac_os)" != xyes ]; then \
-	       for f in $$(find $(idir)/libexec/gcc); do \
+	       for f in $$(find $(idir)/libexec/gcc) $(ildir)/libstdc++**; do \
 	         if ldd $$f &> /dev/null; then \
 	           patchelf --set-rpath $(ildir) $$f; \
 	         fi; \
-- 
cgit v1.2.1