libc/newlib: build in the 'start files' pass

A few facts:
- building the C library requires a proper core compiler
- core compiler is issued from one of the core passes
- the C library is required to build libstdc++
- newlib is only built for baremetal
- in bare metal, the final compiler is issued from one of the core passes

So we need to build the C library between core pass 1 and core pass 2.
The only place is eithe libc_headers() or libc_start_files(). The most
pertinent seems to be libc_start_files().

So we build newlib from libc_start_files(), and leave libc() empty.
This commit is contained in:
Yann E. MORIN" 2010-06-13 23:45:29 +02:00
parent 399e7f8f8a
commit b00d3ef516

View File

@ -59,10 +59,6 @@ do_libc_headers() {
}
do_libc_start_files() {
:
}
do_libc() {
CT_DoStep INFO "Installing C library"
mkdir -p "${CT_BUILD_DIR}/build-libc"
@ -84,18 +80,20 @@ do_libc() {
--host=${CT_BUILD} \
--target=${CT_TARGET} \
--prefix=${CT_PREFIX_DIR}
CT_DoLog EXTRA "Building C library"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoLog EXTRA "Installing C library"
CT_DoLog EXTRA "Installing C library"
CT_DoExecLog ALL make install install_root="${CT_SYSROOT_DIR}"
CT_EndStep
}
do_libc() {
:
}
do_libc_finish() {
CT_DoStep INFO "Finishing C library"