Hi all.
I made cross compiler for "powerpc-405-linux-gnu" from source. and,
glibc also.
after that, I made native gcc for powerpc-405 with the cross compiler.
but, the native compiler doesn`t work... :(
[root@61 tmp]# cat test.c
#include <stdio.h>
int main( void )
{
printf( "hello... ^^\n" );
return 0;
}
[root@61 tmp]# gcc test.c
/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/../../../../powerpc-405-linux-gnu/bin/ld:
crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
[root@61 tmp]#
above is from our target device(ppc 405) console.
so, I add -v option to see what`s going on.
[root@61 tmp]# gcc -v test.c
Reading specs from /usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/specs
Configured with: ./configure --build=i686-pc-linux-gnu
--host=powerpc-405-linux-gnu --target=powerpc-405-linux-gnu
--prefix=/home/parkhw00/work_cvs_db/dgs/common/target/target/usr
--enable-languages=c --with-cpu=405
Thread model: posix
gcc driver version 3.4.4 executing gcc version 3.4.1
/usr/bin/../libexec/gcc/powerpc-405-linux-gnu/3.4.4/cc1 -quiet -v
-iprefix /usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/ -D__unix__
-D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux
-Asystem=linux -Asystem=unix -Asystem=posix test.c -quiet -dumpbase
test.c -mcpu=405 -auxbase test
-version -o /tmp/ccUHH7Sb.s
ignoring nonexistent directory
"/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/../../../../powerpc-405-linux-gnu/include"
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/home/parkhw00/work_cvs_db/dgs/common/target/target/usr/include"
ignoring nonexistent directory
"/home/parkhw00/work_cvs_db/dgs/common/target/target/usr/lib/gcc/powerpc-405-linux-gnu/3.4.4/include"
ignoring nonexistent directory
"/home/parkhw00/work_cvs_db/dgs/common/target/target/usr/powerpc-405-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/include
/usr/include
End of search list.
GNU C version 3.4.4 (powerpc-405-linux-gnu)
compiled by GNU C version 3.4.1.
GGC heuristics: --param ggc-min-expand=33 --param ggc-min-heapsize=7200
/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/../../../../powerpc-405-linux-gnu/bin/as
-m405 -many -V -Qy -o /tmp/ccbkFrvK.o /tmp/ccUHH7Sb.s
GNU assembler version 2.16.1 (powerpc-405-linux-gnu) using BFD version
2.16.1
/usr/bin/../libexec/gcc/powerpc-405-linux-gnu/3.4.4/collect2
--eh-frame-hdr -V -Qy -m elf32ppclinux -dynamic-linker /lib/ld.so.1
crt1.o crti.o
/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/nof/crtbegin.o
-L/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/nof
-L/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4 -L/usr/bin/../lib/gcc
-L/usr/lib/gcc/powerpc-405-linux-gnu/3.4.4/nof
-L/usr/lib/gcc/powerpc-405-linux-gnu/3.4.4
-L/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/../../../../powerpc-405-linux-gnu/lib
/tmp/ccbkFrvK.o -lgcc --as-needed -lgcc_s_nof --no-as-needed -lc -lgcc
--as-needed
-lgcc_s_nof --no-as-needed
/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/nof/crtsavres.o
/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/nof/crtend.o crtn.o
/usr/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.4/../../../../powerpc-405-linux-gnu/bin/ld:
crt1.o: No such file: No such file or directory
GNU ld version 2.16.1
Supported emulations:
elf32ppclinux
elf32ppc
elf32ppcsim
collect2: ld returned 1 exit status
[root@61 tmp]#
I can see gcc program just run correct2 with "crt1.o crti.o" argument
without pull path of the object.
of cource, crt1.o, crti.o is in "/usr/lib" directory.
[root@61 tmp]# find /usr/lib -name crt1.o -o -name crti.o
/usr/lib/crti.o
/usr/lib/crt1.o
[root@61 tmp]#
I don`t know what should do...
can anybody help me???
Thanks in advance.
Hyunwoo Park.