Makefile:171: recipe for target 'sub-make' failed

While building Kernel i used this command :
make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4
The error occur was:
make[1]: Entering directory ‘/home/bmit/Linux_for_Tegra/kernel/kernel-4.9/TEGRA_KERNEL_OUT’
arch/arm64/Makefile:49: LSE atomics not supported by binutils
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
Using … as source for kernel
… is not clean, please run ‘make mrproper’
in the ‘…’ directory.
/home/bmit/Linux_for_Tegra/kernel/kernel-4.9/Makefile:1146: recipe for target ‘prepare3’ failed
make[1]: *** [prepare3] Error 1
make[1]: Leaving directory ‘/home/bmit/Linux_for_Tegra/kernel/kernel-4.9/TEGRA_KERNEL_OUT’
Makefile:171: recipe for target ‘sub-make’ failed
make: *** [sub-make] Error 2

What should i do?

You should probably specify a target, but before that, are you cross compiling? You would only specify ARCH if cross compiling. If cross compiling, then you also need to specify the toolchain.

Even if the commands are correct you would still need to apply build commands against a configured kernel source. An example of configuring first is with target “tegra_defconfig” prior to build, and for build I would name target “Image” or “modules_prepare” followed by target “modules” (modules_prepare is only needed if you didn’t build target Image first).