I noticed when building debug packages with rpm they failed to include the 
source code and also noticed that there was an reference to libstdc++ pointing 
to gcc build/source dir in temp sys.

Google this and found a lazy fix. I have attached a proposed patch for the 
book. I think that using "target_subdir" from config.log like this

   make -C $(grep target_subdir config.log |cut -d"=" -f2 | \
        sed   "s/'//g")/libstdc++-v3

will point to the correct directory on all supported targets in the book. The 
above make command is run after the first make is executed for gcc. The patch 
do this for gcc in temp and final, I don't think  its necessary for the cross 
compiler though.
From cab340dba8a5d0311ed3424853994186d85b1b83 Mon Sep 17 00:00:00 2001
From: Roy Bekken <roy dot bekken at gmail dot com>
Date: Sun, 6 Sep 2009 18:51:40 +0200
Subject: libstdc++ makefiles bugs quick/lazy fix.

---
 BOOK/final-system/common/gcc.xml |    5 ++++-
 BOOK/temp-system/common/gcc.xml  |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/BOOK/final-system/common/gcc.xml b/BOOK/final-system/common/gcc.xml
index c1e1fef..8ee6475 100644
--- a/BOOK/final-system/common/gcc.xml
+++ b/BOOK/final-system/common/gcc.xml
@@ -55,7 +55,10 @@ cd ../gcc-build</userinput></screen>
 
     <para os="j">Compile the package:</para>
 
-<screen os="k"><userinput>make</userinput></screen>
+<screen os="k"><userinput>make
+
+make -C $(grep target_subdir config.log |cut -d"=" -f2 \
+  | sed "s/'//g")/libstdc++-v3</userinput></screen>
 
     <important os="l">
       <para>The test suite for GCC is considered
diff --git a/BOOK/temp-system/common/gcc.xml b/BOOK/temp-system/common/gcc.xml
index 1fffdbb..4af426d 100644
--- a/BOOK/temp-system/common/gcc.xml
+++ b/BOOK/temp-system/common/gcc.xml
@@ -99,7 +99,10 @@ sed "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" \
     <para os="cm">Compile the package:</para>
 
 <screen os="cn"><userinput>make AS_FOR_TARGET="${AS}" \
-    LD_FOR_TARGET="${LD}"</userinput></screen>
+    LD_FOR_TARGET="${LD}"
+
+make -C $(grep target_subdir config.log |cut -d"=" -f2 \
+  | sed "s/'//g")/libstdc++-v3 AS_FOR_TARGET="${AS}" LD_FOR_TARGET="${LD}"</userinput></screen>
 
     <para os="co">Install the package:</para>
 
-- 
1.6.2.5

_______________________________________________
Clfs-dev mailing list
Clfs-dev@lists.cross-lfs.org
http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org

Reply via email to