Merge pull request #19 from davidholsgrove/newlib_headers

Newlib headers for Canadian Crosses
This commit is contained in:
Bryan Hundven 2015-01-07 12:21:30 -08:00
commit 2ba44bb761
2 changed files with 6 additions and 12 deletions

View File

@ -205,20 +205,16 @@ do_cc_core_backend() {
extra_config+=("--enable-threads=no")
extra_config+=("--disable-shared")
extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
copy_headers=y # For baremetal, as there's no headers to copy,
# we copy an empty directory. So, who cares?
;;
shared)
extra_config+=("--enable-shared")
extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
copy_headers=y
;;
baremetal)
extra_config+=("--with-newlib")
extra_config+=("--enable-threads=no")
extra_config+=("--disable-shared")
extra_user_config=( "${CT_CC_EXTRA_CONFIG_ARRAY[@]}" )
copy_headers=n
;;
*)
CT_Abort "Internal Error: 'mode' must be one of: 'static', 'shared' or 'baremetal', not '${mode:-(empty)}'"
@ -231,10 +227,8 @@ do_cc_core_backend() {
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
fi
if [ "${copy_headers}" = "y" ]; then
CT_DoLog DEBUG "Copying headers to install area of bootstrap gcc, so it can build libgcc2"
CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include"
fi
CT_DoLog DEBUG "Copying headers to install area of core C compiler"
CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include"
for tmp in ARCH ABI CPU TUNE FPU FLOAT; do
eval tmp="\${CT_ARCH_WITH_${tmp}}"

View File

@ -50,16 +50,16 @@ do_libc_check_config() {
}
do_libc_start_files() {
CT_DoStep INFO "Installing C library headers & start files"
CT_DoExecLog ALL cp -a "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/newlib/libc/include/." \
"${CT_HEADERS_DIR}"
if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then
CT_DoStep INFO "Installing C library headers & start files"
CT_DoLog EXTRA "Installing Atmel's AVR32 headers"
CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/${CT_TARGET}/include"
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/${LIBC_NEWLIB_AVR_HDRS_BASE}/avr32" \
"${CT_PREFIX_DIR}/${CT_TARGET}/include/"
CT_EndStep
fi
CT_EndStep
}
do_libc() {