Solaris Port: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | Below are some basic things how you can compile FPC, applying approximately to FPC 2.0 and Solaris 7 (SunOS 2.7). For more recent information see [[Lazarus on Solaris]], which applies to 2.4 and Lazarus 0.9.30 (or later) on Solaris 10. | |
| 2 | 2 | ||
| 3 | 3 | Alternatively, if you have Solaris 10 Sparc or later, you might choose to use the FPC 2.6.4 binaries contributed by a user, at <http://www.bolthole.com/solaris/sparc-hints.html> | |
| 4 | 4 | ||
| 5 | 5 | Note that cross compiling is not easy, especially not since you need to link to libc. | |
| 6 | 6 | ||
| 7 | 7 | Also the assembler and linker calls are not correct for assembling and linking on the target platform and may need some manual tweaking in ppas.sh and finally in t_sunos.pas. | |
| 8 | 8 | ||
| 9 | 9 | ## Build binutils | |
| 10 | 10 | ||
| 11 | 11 | Download the latest GNU binutils and build a cross-assembler and linker | |
| 12 | 12 | ||
| 13 | - | ||
| 13 | + | ```text | |
| 14 | + | ./configure --target=i386-pc-solaris2.7 | |
| 15 | + | ``` | |
| 14 | 16 | ||
| 15 | 17 | ## Cross Compile the RTL | |
| 16 | 18 | ||
| 17 | 19 | In the fpc/rtl/solaris/ compile the rtl with: | |
| 18 | 20 | ||
| 19 | - | ||
| 21 | + | ```text | |
| 22 | + | make BINUTILSPREFIX=i386-pc-solaris2.7- OPT=-g | |
| 23 | + | ``` | |
| 20 | 24 | ||
| 21 | 25 | ## Compile the famous hello world \#1 | |
| 22 | 26 | ||
| 23 | 27 | Copy the solaris libc.* files to a dir on Linux | |
| 24 | 28 | ||
| 25 | - | ||
| 29 | + | ```text | |
| 30 | + | ppc386 -g -Xd -XPi386-pc-solaris2.7- -Fl<pathtosolarislibc> -Tsolaris helloworld | |
| 31 | + | ``` | |
| 26 | 32 | ||
| 27 | 33 | Run the executable on solaris (in gdb) | |
| 28 | 34 | ||
| 29 | 35 | ## Compile the famous hello world \#2 | |
| 30 | 36 | ||
| 31 | 37 | Another option is to compile on i386 and assemble and link on Solaris: | |
| 32 | 38 | ||
| 33 | - | ||
| 39 | + | ```text | |
| 40 | + | ppc386 -a -st -Tsolaris helloworld | |
| 41 | + | ``` | |
| 34 | 42 | ||
| 35 | 43 | This creates a ppas.sh script that can be run on Solaris. | |
| 36 | 44 | ||
| 37 | 45 | ## See also | |
| 38 | 46 | ||
| 39 | 47 | - [[Lazarus on Solaris]] | |
| 40 | 48 | ||
| 41 | 49 | --- | |
| 42 | 50 | *From the Free Pascal wiki, page "Solaris Port", as it stood on 2020-08-09 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).* | |
| 43 | 51 | Category: FPC | |
| 44 | 52 | Category: Solaris | |
| 45 | 53 | Category: Unix |
