From af731ae90400bac2116d8fa15e3a0edd209ff4b5 Mon Sep 17 00:00:00 2001 From: David Holsgrove Date: Tue, 12 Mar 2013 15:14:10 +1000 Subject: cc/gcc: Remove copyheaders toggle in do_cc_core_backend, make default Canadian Cross compile for baremetal fails with error; checking for the value of EOF... configure: error: computing EOF failed which is due to libstdc++ configure not being able to find stdio.h Having all modes of the core compiler copyheaders from CT_HEADERS_DIR (in combination with previous patch for newlib to add a do_libc_start_files function to copy into the CT_HEADERS_DIR) resolves this. Signed-off-by: David Holsgrove diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 632bc8c..40241c2 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -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}}" -- cgit v0.10.2-6-g49f6