# HG changeset patch # User "Yann E. MORIN" # Date 1276465529 -7200 # Node ID 63cee3d5ab8592bbdfa573d9140071fd220ebcd2 # Parent 7130357d712b95133f3b76af957e0a887dabd0b8 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. diff -r 7130357d712b -r 63cee3d5ab85 scripts/build/libc/newlib.sh --- a/scripts/build/libc/newlib.sh Sun Jun 13 20:43:02 2010 +0200 +++ b/scripts/build/libc/newlib.sh Sun Jun 13 23:45:29 2010 +0200 @@ -59,10 +59,6 @@ } do_libc_start_files() { - : -} - -do_libc() { CT_DoStep INFO "Installing C library" mkdir -p "${CT_BUILD_DIR}/build-libc" @@ -84,18 +80,20 @@ --host=${CT_BUILD} \ --target=${CT_TARGET} \ --prefix=${CT_PREFIX_DIR} - + CT_DoLog EXTRA "Building C library" + CT_DoExecLog ALL make ${PARALLELMFLAGS} - CT_DoExecLog ALL make ${PARALLELMFLAGS} - 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"