| @@ -1,17 +1,17 @@ | | | @@ -1,17 +1,17 @@ |
1 | Cross-compilation in pkgsrc (user's guide) -*- outline -*- | | 1 | Cross-compilation in pkgsrc (user's guide) -*- outline -*- |
2 | Taylor R. Campbell <riastradh@NetBSD.org> | | 2 | Taylor R. Campbell <riastradh@NetBSD.org> |
3 | | | 3 | |
4 | $NetBSD: HOWTO-use-crosscompile,v 1.16 2024/05/16 13:21:22 riastradh Exp $ | | 4 | $NetBSD: HOWTO-use-crosscompile,v 1.17 2024/05/16 15:48:46 riastradh Exp $ |
5 | | | 5 | |
6 | The following steps enable you to build binary packages for a machine | | 6 | The following steps enable you to build binary packages for a machine |
7 | architecture other than the one you are building on. For example, you | | 7 | architecture other than the one you are building on. For example, you |
8 | might use them on your beefy umpteen-core amd64-based build machine | | 8 | might use them on your beefy umpteen-core amd64-based build machine |
9 | (the `native' machine) to build packages for your feeble powerpc-based | | 9 | (the `native' machine) to build packages for your feeble powerpc-based |
10 | network appliance (the `target' machine). | | 10 | network appliance (the `target' machine). |
11 | | | 11 | |
12 | These instructions assume you use the conventional privileged paths: | | 12 | These instructions assume you use the conventional privileged paths: |
13 | /usr/src for the NetBSD source tree, /usr/obj for the NetBSD object | | 13 | /usr/src for the NetBSD source tree, /usr/obj for the NetBSD object |
14 | tree, and /usr/pkgsrc for the pkgsrc tree. If you want to do it | | 14 | tree, and /usr/pkgsrc for the pkgsrc tree. If you want to do it |
15 | unprivileged, see `* Unprivileged notes' below. | | 15 | unprivileged, see `* Unprivileged notes' below. |
16 | | | 16 | |
17 | XXX This currently works only for NetBSD. | | 17 | XXX This currently works only for NetBSD. |
| @@ -49,26 +49,27 @@ In addition to whatever else you want in | | | @@ -49,26 +49,27 @@ In addition to whatever else you want in |
49 | | | 49 | |
50 | # Specify the machine architecture of target packages. | | 50 | # Specify the machine architecture of target packages. |
51 | CROSS_MACHINE_ARCH= powerpc | | 51 | CROSS_MACHINE_ARCH= powerpc |
52 | | | 52 | |
53 | # Specify the OS of target packages. | | 53 | # Specify the OS of target packages. |
54 | CROSS_OPSYS= NetBSD | | 54 | CROSS_OPSYS= NetBSD |
55 | CROSS_OS_VERSION= 10.0 | | 55 | CROSS_OS_VERSION= 10.0 |
56 | CROSS_OPSYS_VERSION= 100000 | | 56 | CROSS_OPSYS_VERSION= 100000 |
57 | CROSS_LOWER_OPSYS= netbsd | | 57 | CROSS_LOWER_OPSYS= netbsd |
58 | CROSS_LOWER_OPSYS_VERSUFFIX= # empty | | 58 | CROSS_LOWER_OPSYS_VERSUFFIX= # empty |
59 | CROSS_LOWER_OS_VARIANT= # empty | | 59 | CROSS_LOWER_OS_VARIANT= # empty |
60 | CROSS_LOWER_VARIANT_VERSION= # empty | | 60 | CROSS_LOWER_VARIANT_VERSION= # empty |
61 | CROSS_LOWER_VENDOR= # empty | | 61 | CROSS_LOWER_VENDOR= # empty |
| | | 62 | CROSS_OBJECT_FMT= ELF |
62 | | | 63 | |
63 | Optionally, you can set CROSS_LOCALBASE, CROSS_SYSCONFBASE, and | | 64 | Optionally, you can set CROSS_LOCALBASE, CROSS_SYSCONFBASE, and |
64 | CROSS_VARBASE for cross-compiled packages separately from LOCALBASE, | | 65 | CROSS_VARBASE for cross-compiled packages separately from LOCALBASE, |
65 | SYSCONFBASE, and VARBASE for natively compiled packages. For example, | | 66 | SYSCONFBASE, and VARBASE for natively compiled packages. For example, |
66 | you can use an unprivileged pkgsrc build into /home/user/cross/pkg that | | 67 | you can use an unprivileged pkgsrc build into /home/user/cross/pkg that |
67 | will create packages which install to /opt/pkg: | | 68 | will create packages which install to /opt/pkg: |
68 | | | 69 | |
69 | LOCALBASE= /home/user/cross/pkg | | 70 | LOCALBASE= /home/user/cross/pkg |
70 | CROSS_LOCALBASE= /opt/pkg | | 71 | CROSS_LOCALBASE= /opt/pkg |
71 | | | 72 | |
72 | By default, pkgsrc will assume: | | 73 | By default, pkgsrc will assume: |
73 | | | 74 | |
74 | CROSS_LOCALBASE= /usr/pkg | | 75 | CROSS_LOCALBASE= /usr/pkg |