As an interesting experiment, we will cross-compile our preceding memprot program for an ARM system. I have used a convenient way to do this without real hardware: using the powerful Free and Open Source Software (FOSS) Quick Emulator (QEMU) project, to emulate an ARM Versatile Express Cortex-A9 platform!
Cross-compiling the code is indeed simple: notice that there is now a CROSS_COMPILE variable in our Makefile; it's the cross-compiler prefix – the prefix string identifying the toolchain (common to all tools). It's literally prefixed onto the CC (for gcc, or CL for clang) variable, which is the compiler used to build the target. Unfortunately, going into more detail regarding cross-compiling ...