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

cd $JETSON_SOURCES

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

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

sudo ./nvbuild.sh -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.
https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v3.0/toolchain/aarch64--glibc--stable-2022.08-1.tar.bz2

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