As mentioned by warfley, this is not Lazarus related but rather a matter of setting up and configuring the FPC commandline compiler.
the fpc command itself is a front-end for the actual (back-end) compiler (ppcxxx). Providing FPC with options allows to select which specific back-end to use, e.g. fpc -Pi386 -Twin32 (where -T selects the target OS and -P the target processor).
If fpc.cfg file is configured correctly then there should not be a problem compiling anything for any target when using the FPC command-line compiler (front-end).
Now having said that, Lazarus works a bit differently in that it only relies on its own settings (though your global settings might be taken into account and/or interfere) and it only expects the FPC command-line compiler to be setup correctly.
Because I personally disagree with how things are setup by default (on *nix platforms) I use my own custom setup:
.../[fpc]
- [2.6.4]
- [3.0.4]
- [3.2.0]
- [3.2.2]
- bin
- [x64_64-linux]
- fpc
- ppc386
- ppc68k
- ppca64
- ppcppc
- ppcross386
- ppcrossarm
- etc, etc.
- [source]
- [packages]
- etc, etc.
- [rtl]
- etc, etc.
- [units]
- [aarch64-linux]
- [arm-linux]
- [i386-linux]
- [i386-win32]
- [m68k-amiga]
- [powerpc-morphos]
- [x86_64-linux]
- [a52]
- [aspell]
- etc, etc.
- [x86_64-win64]
- etc, etc.
- etc, etc.
- [3.3.1]
- fpc.cfg
- etc, etc.
and besides that use an overall global link to my own custom fpc.sh shell script that invokes the correct fpc executable. I then feed that script to Lazarus.
And on that (side) note: Though lazarus devs seems to keep inventing measures to prevent that from happening, and whomever he/she/they is/are and in case happen to be reading this: leave it the hell alone because I will beat any measures that you smartypants will be able to come up with and doing so without touching any of the source-code (it is literally a battle you can't win and the measures taken benefits no one but your own piece of mind