The "gcc" compiler is also "self-hosting". So, you usually build a "stage1" compiler on the non-target platform and then move to the target system and re-build the compiler with the "stage1" (running through "stage3").
You first need to understand the "Target Triplets" (you listed one "--target"), but you also have "--host" and "--build". From the link,
--build=build-type
the type of system on which the package is being configured and compiled. It defaults to the result of running config.guess.
--host=host-type
the type of system on which the package runs. By default it is the same as the build machine. Specifying it enables the cross-compilation mode.
--target=target-type
the type of system for which any compiler tools in the package produce code (rarely needed). By default, it is the same as host.
See also, Cross Linux From Scratch and the astonishing work at NetBSD.