Hi,
I am building GCC cross compiler for x86_64-elf
for that a have followed steps,
1. mkdir build-gmp build-mpfr
2. cd build-gmp
3. ../gmp-4.2/configure --prefix=/usr/local
4. make all install
5. make check
6.cd ../build-mpfr
7. ../mpfr-2.3.2/configure --prefix=/usr/local/
8. make all install
9. export LD_LIBRARY_PATH= /usr/local/lib
----------------------------------------------------------------------
10. export PREFIX=/usr/cross
11. export TARGET=x86_64-elf
12. cd /usr/src
13. mkdir build-binutils build-gcc
14. cd ../build-binutils
15. ../binutils-2.18/configure --target=$TARGET --prefix=$PREFIX --disable-nls
16. make all
17. make install
18. export PATH=$PATH:$PREFIX/bin
19. cd ../build-gcc
../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --disable-nls
--enable-languages=c,c++ --without-headers --with-gmp=/usr/local --with-mpfr=/usr/local
20. make all-gcc install-gcc
------Porting new library------
21. cd build-newlib/
22. ../newlib-1.17.0/configure --prefix=$PREFIX --target=$TARGET
23. make all install
-------------Rebuild GCC with headers......
using the --with-headers option to tell GCC where to find the headers of new C library.
24. ../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --disable-nls
--enable-languages=c,c++ --with-headers=/usr/cross/x86_64-elf/include --with-gmp=
/usr/local --with-mpfr=/usr/local
25. make all-gcc
26. make install-gcc
It is successfuly installed. But when i am compiling simple helloworld program it is giving error as
[root@vm-centos12 build-gcc]#x86_64-elf-gcc hello.c
/usr/cross/lib/gcc/x86_64-elf/4.3.2/../../../../x86_64-elf/bin/ld: crt0.o: No such file: No such file or directory
collect2: ld returned 1 exit status
I have searched for crt0.o file but this file is not present in gcc installed folder.
Please tell me where is the problem and steps that i followed are correct or not.
I am very much thankful to you.
Regards
Mandar.