Thanks a lot! It works. (It does not compile 3.2.2 and 3.3.1 though.)
Are you talking about official fpc 3.2.2 source?
If so, indeed, you need to compile the patched source from
https://github.com/fredvs/freepascal-ootb/ using the fpc-ootb binary from fpc-ootb release.
You may use the script
build_fpc-ootb-64_openbsd.sh (use fpc-ootb as compiler in the script).
Regarding compiling the official FPC 3.3.1 source code with the fpc-ootb executable, I haven't tried it. I don't know (and highly doubt) if the OpenBSD 7+ patch has already been applied to the main FPC 3.3.1 source code.