manjunatha wrote:
I downloaded binutils (binutils-2.16.1) source file, done
configure, make and installed at /usr/local/bin for MIPS as below:
# ./configure -target=mips-elf --program-prefix=mips-
# make
#make install
Then I downloaded, gcc-3.3.2 source and applied patch
gcc-uclibc-full01.patch.gz file with gcc-3.3.2 to enable the support
of uclibc dynamic linker. I setup configure as :
# ./configure -target=mips-elf -prefix=/usr/local
-program-prefix=mips- -enable-language=c -program-suffix=
then compiled as :
#make
On compiling I got the error:
/root/project/gcc-src/gcc-3.3.2/gcc/xgcc
-B/root/Project-Genesis1-uClibc-scratch/gcc-src/gcc-3.3.2/gcc/
-B/usr/local/bin/mips-elf/bin/
The 'mips-elf' targeted 'as', 'ld' etc. should be in the directory
pointed with this last '-B'...
-B/usr/local/bin/mips-elf/lib/ -isystem /usr/local/bin/mips-elf/include
The 'mips-elf' targeted libraries and headers then SHOULD be in these
two directories...
In your case some uClibc made for the 'mips' architecture, at least the
headers....
-O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -isystem ../include -G 0 -g
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I. -I./.
-I./config -I./../include -DL_m16addsf3 -xassembler-with-cpp -c
./config/mips/mips16.S -o libgcc/./_m16addsf3.o
as: unrecognized option `-G'
Simply the '/usr/local/bin/mips-elf/bin/as' was not found... And the
native '/usr/bin/as'
was used. Why this happened is easy to see. Leaving the '--prefix='
away from the
binutils configure defaulted to using the '--prefix=/usr/local', which
is not the same
as used in the GCC configure. So the clue will be got when looking
where the right 'as'
is now and why it went there... You simply lied about your GCC
configure command :-)
Using a '--prefix=/usr/local/bin' instead of '--prefix=/usr/local' or
leaving it totally away
just as you did in the binutils configure!
I tried # make AS=mips-as
Why? Should this make any difference? Please study the GCC
environment settings
whether it uses the 'AS' for anything! The build scripts, the Makefile
etc. may use it
for something but AFAIK not GCC...