Linux From Scratch (Version SVN-20100529) - 6.9. Glibc-2.11.2

Neal Murphy neal.p.murphy at alum.wpi.edu
Fri Jun 11 23:26:18 PDT 2010


On Saturday 12 June 2010 01:12:45 Chris Staub wrote:
> On 06/12/2010 01:04 AM, Face Man wrote:
> > root:/sources/glibc-build# find /tools -name 'ld*'
> > /tools/x86_64-unknown-linux-gnu/bin/ld
> > /tools/x86_64-unknown-linux-gnu/bin/ld-old
> > /tools/bin/ldd
> > /tools/bin/ld-old
> > /tools/x86_64-lfs-linux-gnu/bin/ld
>

(Instructional; this code is from my modified Smoothwall build system, based 
on LFS. They're very similar, but not necessarily identical. The student's 
exercise is to go to the book and find the exact correlated steps.)

It looks like step 3 (below) of the final toolchain adjustment might not've 
happened.

  mv -v ${TOOLS_DIR}/bin/{ld,ld-old}
  mv -v ${TOOLS_DIR}/$(gcc -dumpmachine)/bin/{ld,ld-old}
  mv -v ${TOOLS_DIR}/bin/{ld-new,ld}
  ln -sv ${TOOLS_DIR}/bin/ld ${TOOLS_DIR}/$(gcc -dumpmachine)/bin/ld

There's no ld, so there might not've been an ld-new to rename. The uncertainty 
should lead the student back to stage 2 of building binutils, where perhaps 
the last step didn't happen:
  cp -v  $(COMPILE_DIR)/ld/ld-new $(TOOLS_DIR)/bin
It is also possible that none of the steps to prepare for the second adjusting 
were executed.

A better command to run might be:
  find /tools -name ld\* -exec ls -l {} \;
which will illuminate symlinks and better help to backtrace the 'human 
program' execution.



More information about the lfs-support mailing list