Pure LFS Hint - good to go

Jules Colding JuBColding at yorkref.com
Sat Feb 15 12:37:26 PST 2003


On Sat, 2003-02-15 at 21:20, Frank Gore wrote:
> to edit the command. However there's one instance:
> 
> SPECFILE=/stage1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/specs
> 
> where version 3.2.1 is explicitly called. This is a silly little detail, but I 
> thought I'd point it out in the name of "anality", since that's the whole 
> driving force behind Pure LFS :) I probably wouldn't even have noticed it, 
> except that the line immediately following this command block specifically 
> states:
> 
> "We recommend you cut'n'paste the above rather than type it all in..."
> 
> but when I did that, it didn't work since I was installing gcc 3.2.2.

I would recommend you to let gcc specify its own spec file. I am using:

gcc_spec ()
{
    if [ -z "$1" ]; then
	echo "No gcc executable in argument list for function, exiting..." 1>&2
	return 1
    fi
    local gcc_bin=$1
    readonly gcc_bin

    if [ -z "$2" ]; then
	echo "No sed executable in argument list for function, exiting..." 1>&2
	return 1
    fi
    local sed_bin=$2
    readonly sed_bin

    local ver_str=$($gcc_bin -v 2>&1 | $sed_bin -n 1p)
    local head="Reading specs from "
    local spec=${ver_str##$head}

    echo "$spec"
    
    return 0
}
SPEC=$(gcc_spec gcc sed)

to do the trick.

-- 
  jules

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list