Try to further fix using of the build and/or host tools for binutils to build properly.
1 # This file adds the function to build the core gcc C compiler
2 # Copyright 2007 Yann E. MORIN
3 # Licensed under the GPL v2. See COPYING in the root of this package
6 mkdir -p "${CT_BUILD_DIR}/build-cc-core"
7 cd "${CT_BUILD_DIR}/build-cc-core"
9 CT_DoStep INFO "Installing core C compiler"
11 CT_DoLog EXTRA "Copy headers to install area of bootstrap gcc, so it can build libgcc2"
12 mkdir -p "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/include"
13 cp -r "${CT_HEADERS_DIR}"/* "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/include" 2>&1 |CT_DoLog DEBUG
15 CT_DoLog EXTRA "Configuring core C compiler"
18 [ "${CT_ARCH_FLOAT_SW}" = "y" ] && extra_config="${extra_config} --with-float=soft"
19 [ -n "${CT_ARCH_CPU}" ] && extra_config="${extra_config} --with-cpu=${CT_ARCH_CPU}"
20 [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}"
21 [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}"
22 [ -n "${CT_ARCH_FPU}" ] && extra_config="${extra_config} --with-fpu=${CT_ARCH_FPU}"
23 [ "${CT_CC_CXA_ATEXIT}" == "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
25 CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
27 # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
28 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
29 "${CT_SRC_DIR}/${CT_CC_CORE_FILE}/configure" \
31 --target=${CT_TARGET} \
33 --prefix="${CT_CC_CORE_PREFIX_DIR}" \
34 --with-local-prefix="${CT_SYSROOT_DIR}" \
37 ${CC_CORE_SYSROOT_ARG} \
41 --enable-symvers=gnu \
42 --enable-languages=c \
44 ${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog DEBUG
46 if [ ! "${CT_CANADIAN}" = "y" ]; then
47 CT_DoLog EXTRA "Building libiberty"
48 make ${PARALLELMFLAGS} all-build-libiberty 2>&1 |CT_DoLog DEBUG
51 CT_DoLog EXTRA "Building core C compiler"
52 make ${PARALLELMFLAGS} all-gcc 2>&1 |CT_DoLog DEBUG
54 CT_DoLog EXTRA "Installing core C compiler"
55 make install-gcc 2>&1 |CT_DoLog DEBUG