From b00d3ef516c0ef9312c05cf1ad552e0149c14142 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 13 Jun 2010 23:45:29 +0200 Subject: 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 --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 4533235..aa679c3 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -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_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" -- cgit v0.10.2-6-g49f6