| @@ -1,17 +1,17 @@ | | | @@ -1,17 +1,17 @@ |
1 | Cross-compilation in pkgsrc (developer's guide) -*- outline -*- | | 1 | Cross-compilation in pkgsrc (developer's guide) -*- outline -*- |
2 | Taylor R. Campbell <riastradh@NetBSD.org> | | 2 | Taylor R. Campbell <riastradh@NetBSD.org> |
3 | | | 3 | |
4 | $NetBSD: HOWTO-dev-crosscompile,v 1.7 2024/04/12 19:54:43 riastradh Exp $ | | 4 | $NetBSD: HOWTO-dev-crosscompile,v 1.8 2024/04/25 14:56:30 riastradh Exp $ |
5 | | | 5 | |
6 | These are some notes on how to make your package cross-compilable. | | 6 | These are some notes on how to make your package cross-compilable. |
7 | There is no single recipe for it -- each package is different, and | | 7 | There is no single recipe for it -- each package is different, and |
8 | even if it follows, say, the GNU build system conventions, it may have | | 8 | even if it follows, say, the GNU build system conventions, it may have |
9 | its quirks, and the author of the software you're packaging may not | | 9 | its quirks, and the author of the software you're packaging may not |
10 | have ever thought of cross-compilation. | | 10 | have ever thought of cross-compilation. |
11 | | | 11 | |
12 | * Native and target platform | | 12 | * Native and target platform |
13 | | | 13 | |
14 | When building a package, MACHINE_ARCH, OPSYS, &c., describe the | | 14 | When building a package, MACHINE_ARCH, OPSYS, &c., describe the |
15 | platform for which the package is being built. If | | 15 | platform for which the package is being built. If |
16 | USE_CROSS_COMPILE=no, this is the native platform; otherwise, if | | 16 | USE_CROSS_COMPILE=no, this is the native platform; otherwise, if |
17 | USE_CROSS_COMPILE=yes, it is the target platform. The additional | | 17 | USE_CROSS_COMPILE=yes, it is the target platform. The additional |
| @@ -110,13 +110,18 @@ or | | | @@ -110,13 +110,18 @@ or |
110 | configure: error: cannot check for file existence when cross-compiling | | 110 | configure: error: cannot check for file existence when cross-compiling |
111 | | | 111 | |
112 | Some of these can be patched to be replaced by compile-tests. | | 112 | Some of these can be patched to be replaced by compile-tests. |
113 | Otherwise, for a particular known target environment, you can | | 113 | Otherwise, for a particular known target environment, you can |
114 | pre-answer the tests for autoconf: | | 114 | pre-answer the tests for autoconf: |
115 | | | 115 | |
116 | .include "../../bsd.prefs.mk" | | 116 | .include "../../bsd.prefs.mk" |
117 | | | 117 | |
118 | .if ${USE_CROSS_COMPILE:tl} == "yes" | | 118 | .if ${USE_CROSS_COMPILE:tl} == "yes" |
119 | # Configure wants to check for /dev/random but can't. We know NetBSD | | 119 | # Configure wants to check for /dev/random but can't. We know NetBSD |
120 | # always has a /dev/random, so inform autoconf of the fact. | | 120 | # always has a /dev/random, so inform autoconf of the fact. |
121 | CONFIGURE_ENV.NetBSD+= ac_cv_file__dev_random=yes | | 121 | CONFIGURE_ENV.NetBSD+= ac_cv_file__dev_random=yes |
122 | .endif | | 122 | .endif |
| | | 123 | |
| | | 124 | * XXX TODO |
| | | 125 | |
| | | 126 | ** document meson issues |
| | | 127 | ** document cmake issues |