Error in installing gcc

Avinesh Kumar avinesh_kumar at
Wed Sep 15 02:17:11 PDT 2004

   I am building linux from scratch and following the guidelines given 
in the LFS book 5.1.1.
I successfully installed binutils as per instruction, but getting error 
in installing gcc. I am using
all the packages only from the tarball uploaded at 
The error message I got is  .......

[lfs at ps2019 gcc-build]$ ../gcc-3.3.3/configure --prefix=/tools 
--with-local-prefix=/tools --disable-nls --enable-shared 
--enable-language=c --with-ld=/tools/bin/ld
Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /mnt/lvm3/sources/gcc-build using "mt-frag"
/tools/bin/ld: unrecognized option '--as-needed'
/tools/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
*** The command 'gcc -o conftest -g -O2   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
[lfs at ps2019 gcc-build]$

please, help me out.


More information about the lfs-support mailing list