compiling pure lfs on sparc

Ryan.Oliver at Ryan.Oliver at
Wed Apr 23 23:58:33 PDT 2003

Juan York wrote:
> > for the first builds of gcc, glibc, and binutils.  That way, you'll
> > generate a toolchain that will run on your host and will generate
> > binaries for the same target.  You may need to play with paths to get
> > toolchain to be the default.
> If I do need multiple copies of everything the paths will probably be a
> pita.

Not really, if you install *everything* with the same prefix.

Binutils installs under /${prefix}/${target}
and creates hard links to /${prefix}/bin

If target is different from host the hardlink will be prefixed by ${target}
(ie sparc-sun-linux-gnu-ld)

Gcc will know which tools to use depending on the target you are compiling
for (it uses whatever it finds in /${prefix}/${target} ).

If you install a gcc for each target, install both into the same --prefix,
but for the one where host != target use the --program-prefix or
--program-suffix options to prepend/append something to the end of the gcc
binaries (could use --program-prefix=-32 or -64 depending)

Then life is easy, to build for target use the -b option to gcc
export CC="gcc -b sparc-sun-linux-gnu" or
export CC="gcc -b sparc64-sun-linux-gnu"


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

More information about the lfs-dev mailing list