travisg/toolchains

How can I use this toolchain

hzy199411 opened this issue · 1 comments

After I build it,
I run ./arm-eabi-4.9.1/bin/arm-eabi-gcc hello.c
it says:
hello.c:1:18: fatal error: stdio.h: No such file or directory
#include<stdio.h>
^
compilation terminated.

then I run ./arm-eabi-4.9.1/bin/arm-eabi-gcc -I/usr/include hello.c
It says:
/opt/x-tools/arm-eabi-4.9.1/bin/../lib/gcc/arm-eabi/4.9.1/../../../../arm-eabi/bin/ld: cannot find crt0.o: No such file or directory
/opt/x-tools/arm-eabi-4.9.1/bin/../lib/gcc/arm-eabi/4.9.1/../../../../arm-eabi/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status

How can I run it?

And I think you should build libc or uclibc in the toolchian to solve the -lc problem.

These toolchains are designed for plain cross-compiler compiling. It is not targetted towards any particular operating system, so there's no libc compiled along with it. You could use it to compile a libc on your own, if you want, however.

I use it to develop my own operating systems or bare metal development on different development boards, so if there's a libc, it's part of that source base.