mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-21 05:43:09 +00:00
Merge pull request #19 from davidholsgrove/newlib_headers
Newlib headers for Canadian Crosses
This commit is contained in:
commit
2ba44bb761
@ -205,20 +205,16 @@ do_cc_core_backend() {
|
|||||||
extra_config+=("--enable-threads=no")
|
extra_config+=("--enable-threads=no")
|
||||||
extra_config+=("--disable-shared")
|
extra_config+=("--disable-shared")
|
||||||
extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
|
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)
|
shared)
|
||||||
extra_config+=("--enable-shared")
|
extra_config+=("--enable-shared")
|
||||||
extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
|
extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
|
||||||
copy_headers=y
|
|
||||||
;;
|
;;
|
||||||
baremetal)
|
baremetal)
|
||||||
extra_config+=("--with-newlib")
|
extra_config+=("--with-newlib")
|
||||||
extra_config+=("--enable-threads=no")
|
extra_config+=("--enable-threads=no")
|
||||||
extra_config+=("--disable-shared")
|
extra_config+=("--disable-shared")
|
||||||
extra_user_config=( "${CT_CC_EXTRA_CONFIG_ARRAY[@]}" )
|
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)}'"
|
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}")
|
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${copy_headers}" = "y" ]; then
|
CT_DoLog DEBUG "Copying headers to install area of core C compiler"
|
||||||
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"
|
CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include"
|
||||||
fi
|
|
||||||
|
|
||||||
for tmp in ARCH ABI CPU TUNE FPU FLOAT; do
|
for tmp in ARCH ABI CPU TUNE FPU FLOAT; do
|
||||||
eval tmp="\${CT_ARCH_WITH_${tmp}}"
|
eval tmp="\${CT_ARCH_WITH_${tmp}}"
|
||||||
|
@ -50,16 +50,16 @@ do_libc_check_config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_libc_start_files() {
|
do_libc_start_files() {
|
||||||
if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then
|
|
||||||
CT_DoStep INFO "Installing C library headers & 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_DoLog EXTRA "Installing Atmel's AVR32 headers"
|
CT_DoLog EXTRA "Installing Atmel's AVR32 headers"
|
||||||
CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/${CT_TARGET}/include"
|
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_DoExecLog ALL cp -r "${CT_SRC_DIR}/${LIBC_NEWLIB_AVR_HDRS_BASE}/avr32" \
|
||||||
"${CT_PREFIX_DIR}/${CT_TARGET}/include/"
|
"${CT_PREFIX_DIR}/${CT_TARGET}/include/"
|
||||||
|
|
||||||
CT_EndStep
|
|
||||||
fi
|
fi
|
||||||
|
CT_EndStep
|
||||||
}
|
}
|
||||||
|
|
||||||
do_libc() {
|
do_libc() {
|
||||||
|
Loading…
Reference in New Issue
Block a user