Index: build-cc ================================================================== --- build-cc +++ build-cc @@ -65,25 +65,28 @@ ### Determine list of platforms platforms=( armel-generic-linux-uclibc mipsel-generic-linux-uclibc mips-generic-linux-musl + arm-generic-linux-gnueabihf x86_64-generic-linux-musl x86_64-generic-linux-gnu ) untested_platforms=( powerpc-generic-linux-gnu powerpc-generic-linux-uclibc mips64-ubnt-linux-gnu + xtensa-esp32-elf ) if [ "${BUILD_CC_USE_UNTESTED}" = '1' ]; then platforms=("${platforms[@]}" "${untested_platforms[@]}") fi idx="${#platforms[@]}" + for platform in "${BUILD_CC_PLATFORMDIR}"/*-platform.tar.bz2; do if [ ! -f "${platform}" ]; then continue fi @@ -295,10 +298,19 @@ BUILD_CC_GCC_CONFIGURE_EXTRA="${BUILD_CC_GCC_CONFIGURE_EXTRA} ${add}" fi rm -f "${CCDIR}/${CCNAME}/BUILD_CC_GCC_CONFIGURE_EXTRA" fi + +### Generic Build-CC extension +if [ -f "${CCDIR}/${CCNAME}/BUILD_CC_CONFIG" ]; then + for buildCCVar in BUILD_CC_NO_LANG_CXX BUILD_CC_EXTRA_LANGUAGES; do + buildCCVarVal="$(grep "^${buildCCVar}=" "${CCDIR}/${CCNAME}/BUILD_CC_CONFIG")" || continue + buildCCVarVal="$(echo "${buildCCVarVal}" | cut -f 2 -d =)" + eval "$buildCCVar=$(set | grep '^buildCCVarVal=' | sed 's@^buildCCVarVal=@@')" + done +fi ## Determine stage of build process STAGE="$2" ### If we have a platform tarball and a stage has not been specified, assume we are at stage 2 @@ -546,13 +558,17 @@ ${MAKE} ${BUILD_CC_MAKE_FLAGS} install-target-libgcc || exit 1 else if [ -n "${BUILD_CC_EXTRA_LANGUAGES}" ]; then BUILD_CC_EXTRA_LANGUAGES=",${BUILD_CC_EXTRA_LANGUAGES}" fi + + if [ -z "${BUILD_CC_NO_LANG_CXX}" ]; then + BUILD_CC_EXTRA_LANGUAGES=",c++${BUILD_CC_EXTRA_LANGUAGES}" + fi ### Stage 2 -- the full compiler suite - "../${GCC_DIR}/configure" --target="${CCNAME}" --prefix="${CCDIR}" --with-headers="${CCDIR}/${CCNAME}/include" --disable-nls --enable-languages="c,c++${BUILD_CC_EXTRA_LANGUAGES}" --with-sysroot="${CCDIR}/${CCNAME}" --with-build-sysroot="${CCDIR}/${CCNAME}" --program-prefix="${CCNAME}-" --with-system-zlib ${BUILD_CC_GCC_CONFIGURE_EXTRA} + "../${GCC_DIR}/configure" --target="${CCNAME}" --prefix="${CCDIR}" --with-headers="${CCDIR}/${CCNAME}/include" --disable-nls --enable-languages="c,${BUILD_CC_EXTRA_LANGUAGES}" --with-sysroot="${CCDIR}/${CCNAME}" --with-build-sysroot="${CCDIR}/${CCNAME}" --program-prefix="${CCNAME}-" --with-system-zlib ${BUILD_CC_GCC_CONFIGURE_EXTRA} ${MAKE} ${BUILD_CC_MAKE_FLAGS} || exit 1 ${MAKE} ${BUILD_CC_MAKE_FLAGS} install || exit 1 fi ) || exit 1 ADDED scripts/gcc/xtensa-esp32 Index: scripts/gcc/xtensa-esp32 ================================================================== --- /dev/null +++ scripts/gcc/xtensa-esp32 @@ -0,0 +1,10 @@ +#! /usr/bin/env bash + +CCNAME="$1" +CCDIR="$2" +STAGE="$4" +sourcefile="$5" + +#XXX:TODO: copy XCHAL from platform .h file into gcc .h files + +exit 0 Index: scripts/post/10-zlib ================================================================== --- scripts/post/10-zlib +++ scripts/post/10-zlib @@ -29,10 +29,17 @@ # Only build in the final stage if [ "${STAGE}" != "stage2" ]; then exit 0 fi + +# Skip unusual platforms +case "${CCNAME}" in + xtensa-esp32-elf) + exit 0 + ;; +esac # Download source . 'scripts/common' if [ ! -d "${ZLIB_DIR}" ]; then