Update mips-unknown-linux-uclibc to the latest set of config options.
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
7 # Ah! gcc folks are kind of 'different': they store the tarballs in
8 # subdirectories of the same name! That's because gcc is such /crap/ that
9 # it is such /big/ that it needs being splitted for distribution! Sad. :-(
10 # Arrgghh! Some of those versions does not follow this convention:
11 # gcc-3.3.3 lives in releases/gcc-3.3.3, while gcc-2.95.* isn't in a
12 # subdirectory! You bastard!
13 CT_GetFile "${CT_CC_CORE_FILE}" \
14 ftp://ftp.gnu.org/gnu/gcc/${CT_CC_CORE_FILE} \
15 ftp://ftp.gnu.org/gnu/gcc/releases/${CT_CC_CORE_FILE} \
16 ftp://ftp.gnu.org/gnu/gcc
20 do_cc_core_extract() {
21 CT_ExtractAndPatch "${CT_CC_CORE_FILE}"
26 mkdir -p "${CT_BUILD_DIR}/build-cc-core"
27 cd "${CT_BUILD_DIR}/build-cc-core"
29 CT_DoStep INFO "Installing core C compiler"
31 CT_DoLog EXTRA "Copying headers to install area of bootstrap gcc, so it can build libgcc2"
32 mkdir -p "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/include"
33 cp -r "${CT_HEADERS_DIR}"/* "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/include" 2>&1 |CT_DoLog DEBUG
35 CT_DoLog EXTRA "Configuring core C compiler"
38 [ "${CT_ARCH_FLOAT_SW}" = "y" ] && extra_config="${extra_config} --with-float=soft"
39 [ -n "${CT_ARCH_ABI}" ] && extra_config="${extra_config} --with-abi=${CT_ARCH_ABI}"
40 [ -n "${CT_ARCH_CPU}" ] && extra_config="${extra_config} --with-cpu=${CT_ARCH_CPU}"
41 [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}"
42 [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}"
43 [ -n "${CT_ARCH_FPU}" ] && extra_config="${extra_config} --with-fpu=${CT_ARCH_FPU}"
44 [ "${CT_CC_CXA_ATEXIT}" == "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
46 CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
48 # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
49 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
50 "${CT_SRC_DIR}/${CT_CC_CORE_FILE}/configure" \
52 --target=${CT_TARGET} \
54 --prefix="${CT_CC_CORE_PREFIX_DIR}" \
55 --with-local-prefix="${CT_SYSROOT_DIR}" \
58 ${CC_CORE_SYSROOT_ARG} \
62 --enable-symvers=gnu \
63 --enable-languages=c \
65 ${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
67 if [ ! "${CT_CANADIAN}" = "y" ]; then
68 CT_DoLog EXTRA "Building libiberty"
69 make ${PARALLELMFLAGS} all-build-libiberty 2>&1 |CT_DoLog ALL
72 CT_DoLog EXTRA "Building core C compiler"
73 make ${PARALLELMFLAGS} all-gcc 2>&1 |CT_DoLog ALL
75 CT_DoLog EXTRA "Installing core C compiler"
76 make install-gcc 2>&1 |CT_DoLog ALL