diff --git a/scripts/crosstool-NG.sh b/scripts/crosstool-NG.sh index fdcfe4b3..bfada4f6 100644 --- a/scripts/crosstool-NG.sh +++ b/scripts/crosstool-NG.sh @@ -361,10 +361,12 @@ if [ -z "${CT_RESTART}" ]; then # binutils 2.14 and later obey it, older binutils ignore it. # Lets you build a working 32->64 bit cross gcc CT_BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}" - # Use --with-headers, else final gcc will define disable_glibc while - # building libgcc, and you'll have no profiling CT_CC_CORE_SYSROOT_ARG=("--without-headers") - CT_CC_SYSROOT_ARG=("--with-headers=${CT_HEADERS_DIR}") + if [ "${CT_LIBC_GLIBC}" = "y" ]; then + # Use --with-headers, else final gcc will define disable_glibc while + # building libgcc, and you'll have no profiling + CT_CC_SYSROOT_ARG=("--with-headers=${CT_HEADERS_DIR}") + fi fi CT_DoExecLog ALL mkdir -p "${CT_SYSROOT_DIR}" CT_DoExecLog ALL mkdir -p "${CT_DEBUGROOT_DIR}"