Libc Linking Issue #2
Posted: Sun Mar 29, 2015 1:17 pm
Hi,
It appeasrs that I am having a lot of trouble trying to get my i386-arcrascent-gcc toolchain to work .
Thanks to [sortie] again, I successfully built my toolchain and got it to work with libc - the produced executable successfully executed in my os, with all the syscall routines working properly, which made me very happy yesterday . However, I have found another issue with my toolchain. My gcc toolchain refuses to link libc by default. I always have to provide '-lc -lg -lm -lnosys' to build a program.
I have to do
instead of
This is very inconvenient. Also, when porting software, this issue makes it impossible for me to configure them because the configure script always complains about libc missing.
btw, I am using newlib as my libc and my gcc is v4.9.2.
How could I fix this issue?
Thanks.
It appeasrs that I am having a lot of trouble trying to get my i386-arcrascent-gcc toolchain to work .
Thanks to [sortie] again, I successfully built my toolchain and got it to work with libc - the produced executable successfully executed in my os, with all the syscall routines working properly, which made me very happy yesterday . However, I have found another issue with my toolchain. My gcc toolchain refuses to link libc by default. I always have to provide '-lc -lg -lm -lnosys' to build a program.
I have to do
Code: Select all
i386-arcrascent-gcc -ohello hello.c -lc -lg -lm -lnosys
Code: Select all
i386-arcrascent-gcc -ohello hello.c
btw, I am using newlib as my libc and my gcc is v4.9.2.
How could I fix this issue?
Thanks.