GCC second pass make error

Ken Moffat ken at linuxfromscratch.org
Sun Jan 28 07:39:43 PST 2007

On Sun, Jan 28, 2007 at 02:29:39PM +0100, Steffen H. Larsen wrote:
> I made this command as you suggested
> ls -l /tools/gcc-4.0.3/gcc/Makefile* /tools/gcc-build/gcc/Makefile
> and the result was this
> -rw-r--r-- lfs lfs 0 jan 26 22:31 /tools/gcc-4.0.3/gcc/Makefile.in
> -rw-r--r-- lfs lfs 0 jan 26 22:31 /tools/gcc-4.0.3/gcc/Makefile.in.tmp
> -rw-r--r-- lfs lfs 0 jan 26 22:31 /tools/gcc-build/gcc/Makefile

 Thank you.  You haven't commented on this, so I'll point out the
problem.  Here is a gcc I've just untarred:

-rw-r--r-- 1 ken users 180686 2005-09-09 22:05 gcc-4.0.3/gcc/Makefile.in

 Your Makefile.in is empty (length 0) which is why the Makefile ends
up empty.  The Makefile.in.tmp is from the instructions which add
-fomit-frame-pointer, and at this stage the length was already 0.
So, if we go back a stage further we have two commands:

cp -v gcc/Makefile.in{,.orig} &&
sed 's@\./fixinc\.sh at -c true@' gcc/Makefile.in.orig > gcc/Makefile.in

 I'm not sure exactly what you did wrongly.  Possibly, you missed
the first line (the copy) and then ran sed against the missing
.orig, which overwrote the original.  When I do something like that,
I get 'No such file or directory' so perhaps you found a different
way of misreading or mis-keying it.  Anyway, you need to re-extract
the source, clear away the build directory, and start gcc pass 2

 Sed will always open stdout if given half a chance, which is why in
chapter 5 we copy the file before we sed it.  In chapter 6 we
probably use the '-i' flag to do in-place changes, but we can't
guarantee the host system will understand that.

das eine Mal als Tragödie, das andere Mal als Farce

More information about the lfs-support mailing list