mgl@1371: # This file adds functions to build the Newlib C library mgl@1371: # Copyright 2008 Yann E. MORIN mgl@1371: # Licensed under the GPL v2. See COPYING in the root of this package mgl@1371: # mgl@1371: # Edited by by Martin Lund mgl@1371: # mgl@1371: mgl@1371: mgl@1371: do_libc_get() { mgl@1371: libc_src="ftp://sources.redhat.com/pub/newlib" mgl@1371: mgl@1371: CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src} mgl@1371: mgl@1371: return 0 mgl@1371: } mgl@1371: mgl@1371: do_libc_extract() { mgl@1371: CT_Extract "newlib-${CT_LIBC_VERSION}" mgl@1371: CT_Patch "newlib-${CT_LIBC_VERSION}" mgl@1371: mgl@1371: return 0 mgl@1371: } mgl@1371: mgl@1371: do_libc_check_config() { mgl@1371: : mgl@1371: } mgl@1371: mgl@1371: do_libc_headers() { mgl@1371: : mgl@1371: } mgl@1371: mgl@1371: do_libc_start_files() { mgl@1371: : mgl@1371: } mgl@1371: mgl@1371: do_libc() { mgl@1371: CT_DoStep INFO "Installing C library" mgl@1371: mgl@1371: mkdir -p "${CT_BUILD_DIR}/build-libc" mgl@1371: cd "${CT_BUILD_DIR}/build-libc" mgl@1371: mgl@1371: CT_DoLog EXTRA "Configuring C library" mgl@1371: mgl@1372: # FIXME mgl@1372: # BUILD_CC="${CT_BUILD}-gcc" \ mgl@1372: # CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O" \ mgl@1372: # CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ mgl@1371: AR=${CT_TARGET}-ar \ mgl@1371: RANLIB=${CT_TARGET}-ranlib \ mgl@1371: CT_DoExecLog ALL \ mgl@1371: "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/configure" \ mgl@1371: --build=${CT_BUILD} \ mgl@1371: --host=${CT_HOST} \ mgl@1371: --target=${CT_TARGET} \ mgl@1371: --prefix=${CT_PREFIX_DIR} \ mgl@1371: ${extra_config} \ mgl@1371: ${CT_LIBC_GLIBC_EXTRA_CONFIG} mgl@1371: mgl@1371: CT_DoLog EXTRA "Building C library" mgl@1371: mgl@1371: CT_DoExecLog ALL make mgl@1371: mgl@1371: CT_DoLog EXTRA "Installing C library" mgl@1371: mgl@1371: CT_DoExecLog ALL make install install_root="${CT_SYSROOT_DIR}" mgl@1371: mgl@1371: CT_EndStep mgl@1371: } mgl@1371: mgl@1371: do_libc_finish() { mgl@1371: : mgl@1371: }