CC = gcc -m32
TARGET_ARCH = x86
This tells the FB makefile to build for 32bit instead of the 64bit default.
Setting CC to
gcc -m32 instead of
gcc causes all C code to be compiled for 32bit rather than the default 64bit.
Assuming that the existing installed fbc is a 32bit one, it will already default to compiling to 32bit, so setting FBC to
fbc -arch 32 instead of
fbc is not needed (and older 32bit-only fbc versions did not even have the
-arch 32 option anyways).
Setting the TARGET_ARCH to x86 is necessary to override the FB makefile's
uname -m check (because that returns x86_64 on 64bit). This allows the FB makefile to select the proper x86 rtlib/gfxlib2 modules and to use the correct directory layout for x86.