Is there a tutorial for bootstrapping freepascal for a certain operating system?
For an unsupported operating system or one that is already supported but has no binary release?
For the former see
this slightly outdated example (though more or less still valid).
For the later see - as
marcov mentioned - the buildfaq. Though in short: you need suitable binutils for a host for which the compiler exists and then build it using
make all OS_TARGET=<targetos> CPU_TARGET=<targetcpu> BINUTILSPREFIX=<prefix> CROSSBINDIR=<path>
make install OS_TARGET=<targetos> CPU_TARGET=<targetcpu> INSTALL_PREFIX=/path/for/install
<targetos> and
<targetcpu> are the names of the OS and CPU for your desired system respectively,
<prefix> is the prefix that the binutils use (e.g.
aarch64-elf-),
<path> is the path where the binutils reside (if they aren't located in
$PATH, in that case you can leave out that option) and
/path/for/install is where you want to copy the installation to before you move it over to your real operating system.
For my needs, freepascal 3.0.4 is more than enough. But is available for only a few operating systems. And I am interested in DragonFlyBSD for its mp support which is better than in NetBSD and OpenBSD and for its wonderful file system (Hammer/Hammer2).
Seems like no one was interested enough to create a binary distribution for DragonFlyBSD.
Sometimes, the ABI breaks in these UNIXes and you have to recompile all the applications (and repeat the bootstrap for fpc) and I want to be able to carry that version of pascal from version to version, without disturbing anyone. And without anyone knowing what I need and use (well, too late now) and for what.
Sometimes source adjustments are necessary however as was recently the case with FreeBSD. Then a simple recompile won't help.