diff --git a/chapter05/lockingglibc.xml b/chapter05/lockingglibc.xml index 02ba66b3c..45ab0d683 100644 --- a/chapter05/lockingglibc.xml +++ b/chapter05/lockingglibc.xml @@ -29,11 +29,13 @@ Binutils build and source directories. The next thing to do is to amend our GCC specs file so that it points to the new dynamic linker. A simple sed will accomplish this: + + -SPECFILE=/tools/lib/gcc-lib/*/*/specs +SPECFILE=/tools/lib/gcc-lib/*/*/specs && sed -e 's@/lib/ld-linux.so.2@/tools/lib/ld-linux.so.2@g' \ -    $SPECFILE > tempspecfile -mv tempspecfile $SPECFILE +    $SPECFILE > tempspecfile && +mv -f tempspecfile $SPECFILE && unset SPECFILE We recommend that you cut-and-paste the above rather than try and type it diff --git a/chapter06/adjustingtoolchain.xml b/chapter06/adjustingtoolchain.xml index c20a67be8..f07562f9c 100644 --- a/chapter06/adjustingtoolchain.xml +++ b/chapter06/adjustingtoolchain.xml @@ -40,10 +40,12 @@ problem here. The above command takes care of this also. to the new dynamic linker. Just like earlier on, we use a sed to accomplish this: -SPECFILE=/tools/lib/gcc-lib/*/*/specs + + +SPECFILE=/tools/lib/gcc-lib/*/*/specs && sed -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \ -    $SPECFILE > newspecfile -mv newspecfile $SPECFILE +    $SPECFILE > newspecfile && +mv -f newspecfile $SPECFILE && unset SPECFILE Again, cutting and pasting the above is recommended. And just like