# git rev-parse -q --verify 1e55a97544c133304c8ae9d56eb8da183797f646^{commit} 1e55a97544c133304c8ae9d56eb8da183797f646 already have revision, skipping fetch # git checkout -q -f -B kisskb 1e55a97544c133304c8ae9d56eb8da183797f646 # git clean -qxdf # git log -1 commit 1e55a97544c133304c8ae9d56eb8da183797f646 Author: Sam bobroff Date: Mon Feb 22 16:13:08 2016 +1100 powerpc: Detect broken or mismatched toolchains It can currently be difficult to diagnose a build that fails due to the compiler, linker or other parts of the toolchain being unable to build binaries of the type required by the kernel config. For example using a little endian toolchain to build a big endian kernel may produce: as: unrecognized option '-maltivec' This patch adds a basic compile test and error message to arch/powerpc/Makefile so that the above error becomes: *** Sorry, your toolchain seems to be broken or incorrect. *** Make sure it supports your kernel configuration (ppc64). Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman # < /opt/cross/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < git log --format=%s --max-count=1 1e55a97544c133304c8ae9d56eb8da183797f646 # < make -j 48 ARCH=powerpc O=/home/kisskb/slave/build/mpe_powerpc-allmodconfig_powerpc CROSS_COMPILE=/opt/cross/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- allmodconfig warning: (MPC836x_RDK && MTD_NAND_FSL_ELBC && MTD_NAND_FSL_UPM) selects FSL_LBC which has unmet direct dependencies (FSL_SOC) # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_SAMPLES=n # yes \n | make -j 48 ARCH=powerpc O=/home/kisskb/slave/build/mpe_powerpc-allmodconfig_powerpc CROSS_COMPILE=/opt/cross/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- oldconfig yes: standard output: Broken pipe yes: write error # make -j 48 ARCH=powerpc O=/home/kisskb/slave/build/mpe_powerpc-allmodconfig_powerpc CROSS_COMPILE=/opt/cross/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- make[1]: Entering directory '/home/kisskb/slave/build/mpe_powerpc-allmodconfig_powerpc' GEN ./Makefile scripts/kconfig/conf --silentoldconfig Kconfig warning: (MPC836x_RDK && MTD_NAND_FSL_ELBC && MTD_NAND_FSL_UPM) selects FSL_LBC which has unmet direct dependencies (FSL_SOC) warning: (MPC836x_RDK && MTD_NAND_FSL_ELBC && MTD_NAND_FSL_UPM) selects FSL_LBC which has unmet direct dependencies (FSL_SOC) *** Sorry, your toolchain seems to be broken or incorrect. *** Make sure it supports your kernel configuration (ppc64). arch/powerpc/Makefile:358: recipe for target 'checkbin' failed make[1]: *** [checkbin] Error 1 make[1]: Leaving directory '/home/kisskb/slave/build/mpe_powerpc-allmodconfig_powerpc' Makefile:146: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 Command 'make -j 48 ARCH=powerpc O=/home/kisskb/slave/build/mpe_powerpc-allmodconfig_powerpc CROSS_COMPILE=/opt/cross/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- ' returned non-zero exit status 2 # rm -rf /home/kisskb/slave/build/mpe_powerpc-allmodconfig_powerpc # Build took: 0:00:04.343873