This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See crosstool-NG for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
In build script gcc.sh, I found a comments: "In case the threading model is NPTL, we need a shared-capable core gcc". Yes, shared-capable gcc will need crt*.o, because libgcc*.so will linked with crt*.o. Accoring build script, in fact, the option "--disable-shared" is removed when building core gcc pass 2. So if the anwser is : To support NPTL, we need a cross gcc with "--enable-shared", i.e., building libgcc_.so instead of libgcc.a. while linking libgcc_s.so, link editor need crt*.o, so build crt*.o before building core gcc pass 2 ? If above is true, the question is transfered to : why need a shared-capable core gcc to build NPTL ? Thanks in advance. 2013/1/17 Wang Baisheng <baisheng.wang.cn@gmail.com>: > 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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |