Sign in Join
Wiki copytemporary

Link on target: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11The -st option defers assembling and linking to be made manually after compiling with fpc. Instead a script is generated which, when is executed on the target, completes the build process. The name of the script is \<target\>_ppas.
22
33The script assumes the file tree is the same on the target as on the host, and that the script's directory is the current directory. Depending on the setup, this can be accomplished in different ways. If the target is on a different computer, the files have to be transfered via a network, pendrive or by some other means. If the target is a different operating system on the same machine, the files don't have to be moved physically. Instead, it is enough to shut down the host and start the target operating system. When compiling on Darwin (macOS) as host for (classic) Mac OS as target, one even does not have to restart, if the classic compatibility environment is installed. Instead just switch to [[MPW]] (which is running in the classic compatibility environment) and execute your script there (but read the remark below).
44
55A caveat when running the script in MPW: Because the script is created in Darwin, it has no Mac file type and creator. Because of this MPW refuses to accept it as a script. So you have to give it a Mac file type, which can be done with the following command in MPW:
66
7-` SetFile -c 'MPS ' -t 'TEXT' filename`
7+```text
8+ SetFile -c 'MPS ' -t 'TEXT' filename
9+```
810
911Read more about working with MPW in [[MPW]].
1012
1113Note that some options given to the compiler, will also affect the generated script:
1214
13-` -a`
15+```text
16+ -a
17+```
1418
1519... normally means that the compiler doesn't delete the generated assembler file. When used with -st ( or -s ) the generated script will, when executed, not delete the assembler file. This is good for debuging purposes.
1620
1721---
1822*From the Free Pascal wiki, page "Link on target", as it stood on 2019-12-23 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history