I have just stumbled upon a better work round for this problem - https://lore.kernel.org/linux-arm-kernel/[email protected]/ - the arch/arm/Makefile can be modified to remove all the cc-option commands that modify the architecture specific and tuning specific compiler options!
I presume that the out of tree module build does not for some reason use the arch/arm/Makefile whilst my in-tree module build uses the Makefile an so has the build problem with gcc v11 and above.