Mlittle-endian error when compiling jp6

I can flash jp6 to device and all works correctly. However, if I try to recompile the kernel for r36.3.0 I get a compiler error

gcc: error: unrecognized command line option ‘-mlittle-endian’

using latest L4T-GCC and commands


sudo make -C $JETSON_SOURCES/ O=$KERNEL_OUT clean

sudo make -C $JETSON_SOURCES/ O=$KERNEL_OUT mrproper

sudo ./ -o $KERNEL_OUT

gcc paths match gcc folder so thats not the problem.

What are the possible reasons for getting this error

You are not using the right compiler version.

Thanks Dave, this is the compiler I was using.

My problem was resolved by re-extracting JP6 and GCC and then a reboot to ensure paths were working, then problem went away