| @@ -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.2 2013/05/11 20:15:10 riastradh Exp $ | | 4 | $NetBSD: HOWTO-use-crosscompile,v 1.3 2016/05/04 02:03:13 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. |
| @@ -47,31 +47,31 @@ In addition to whatever else you want in | | | @@ -47,31 +47,31 @@ In addition to whatever else you want in |
47 | | | 47 | |
48 | .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) | | 48 | .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) |
49 | # Specify the machine architecture of target packages. | | 49 | # Specify the machine architecture of target packages. |
50 | # | | 50 | # |
51 | # XXX This currently can't be set on the command line, which is a | | 51 | # XXX This currently can't be set on the command line, which is a |
52 | # bug. | | 52 | # bug. |
53 | MACHINE_ARCH= powerpc | | 53 | MACHINE_ARCH= powerpc |
54 | | | 54 | |
55 | # Point pkgsrc at the NetBSD tooldir and destdir. | | 55 | # Point pkgsrc at the NetBSD tooldir and destdir. |
56 | # | | 56 | # |
57 | # XXX There is no obvious variable that is set to amd64 so that we | | 57 | # XXX There is no obvious variable that is set to amd64 so that we |
58 | # could use | | 58 | # could use |
59 | # | | 59 | # |
60 | # TOOLDIR= /usr/obj/tooldir.${OPSYS}-${OS_VERSION}.${NATIVE_xyz} | | 60 | # TOOLDIR= /usr/obj/tooldir.${OPSYS}-${OS_VERSION}-${NATIVE_xyz} |
61 | # | | 61 | # |
62 | # MACHINE is amd64 but, since it's not NATIVE_xyz, it's wrong. | | 62 | # MACHINE is amd64 but, since it's not NATIVE_xyz, it's wrong. |
63 | # NATIVE_MACHINE_ARCH is x86_64, not amd64. | | 63 | # NATIVE_MACHINE_ARCH is x86_64, not amd64. |
64 | TOOLDIR= /usr/obj/tooldir.NetBSD-6.1.amd64 | | 64 | TOOLDIR= /usr/obj/tooldir.NetBSD-6.1-amd64 |
65 | CROSS_DESTDIR= /usr/obj/destdir.evbppc | | 65 | CROSS_DESTDIR= /usr/obj/destdir.evbppc |
66 | | | 66 | |
67 | # Put target work and packages in separate directories. (You might | | 67 | # Put target work and packages in separate directories. (You might |
68 | # use OBJMACHINE=yes or WRKOBJDIR=/tmp/work.${MACHINE_ARCH} instead | | 68 | # use OBJMACHINE=yes or WRKOBJDIR=/tmp/work.${MACHINE_ARCH} instead |
69 | # for the work directories.) | | 69 | # for the work directories.) |
70 | # | | 70 | # |
71 | # XXX Should not need this. | | 71 | # XXX Should not need this. |
72 | PACKAGES= ${PKGSRCDIR}/packages.${MACHINE_ARCH} | | 72 | PACKAGES= ${PKGSRCDIR}/packages.${MACHINE_ARCH} |
73 | WRKDIR_BASENAME= work.${MACHINE_ARCH} | | 73 | WRKDIR_BASENAME= work.${MACHINE_ARCH} |
74 | .endif | | 74 | .endif |
75 | | | 75 | |
76 | You can bootstrap pkgsrc or not; it shouldn't make a difference for | | 76 | You can bootstrap pkgsrc or not; it shouldn't make a difference for |
77 | cross-compilation. If you do, replace `make' by `bmake' below, of | | 77 | cross-compilation. If you do, replace `make' by `bmake' below, of |