why build start files before core gcc pass 2 ?
Wang Baisheng
baisheng.wang.cn@gmail.com
Thu Jan 17 04:39:00 GMT 2013
Dear yan and All,
Before using ct-ng, I built a toolchain as the following steps:
1 build binutils;
2 bare-metal(freestanding) gcc
a configured with "--with-newlib" not to depend on glibc;
b configured with "--disable-shared" to build static libgcc, because
shared libgcc will linked start files, crt*.o, which will be built in
glibc.
3 use the bare-meta gcc builing glibc;
4 glibc is ready, so compile the full gcc.
while studying ct-ng scripts, I found ct-ng add another gcc step:
after building bare-meta gcc, ct-ng install libc headers and build
crt*.o files, then build gcc pass 2, then building glibc using gcc
pass 2, then final gcc.
What I am confused is:
The crt*.o files is linked into executable and shared, so why gcc need
these files in compiling time, why gcc need crt*.o files ?
in docs "How is a toolchain constructed.txt", it said "The start files
are a very few files that gcc needs to be able to turn on thread local
storage (TLS) on an NPTL system." But I can not grasp it.
Thanks.
Regards,
Jacky
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list