Thu May 16 13:21:22 2024 UTC (31d)
doc/HOWTO-use-crosscompile: Fix confusing comment in example mk.conf.


(riastradh)
diff -r1.15 -r1.16 pkgsrc/doc/HOWTO-use-crosscompile

cvs diff -r1.15 -r1.16 pkgsrc/doc/HOWTO-use-crosscompile (expand / switch to unified diff)

--- pkgsrc/doc/HOWTO-use-crosscompile 2024/04/12 19:57:06 1.15
+++ pkgsrc/doc/HOWTO-use-crosscompile 2024/05/16 13:21:22 1.16
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1Cross-compilation in pkgsrc (user's guide) -*- outline -*- 1Cross-compilation in pkgsrc (user's guide) -*- outline -*-
2Taylor R. Campbell <riastradh@NetBSD.org> 2Taylor R. Campbell <riastradh@NetBSD.org>
3 3
4$NetBSD: HOWTO-use-crosscompile,v 1.15 2024/04/12 19:57:06 riastradh Exp $ 4$NetBSD: HOWTO-use-crosscompile,v 1.16 2024/05/16 13:21:22 riastradh Exp $
5 5
6The following steps enable you to build binary packages for a machine 6The following steps enable you to build binary packages for a machine
7architecture other than the one you are building on. For example, you 7architecture other than the one you are building on. For example, you
8might use them on your beefy umpteen-core amd64-based build machine 8might 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
10network appliance (the `target' machine). 10network appliance (the `target' machine).
11 11
12These instructions assume you use the conventional privileged paths: 12These 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
14tree, and /usr/pkgsrc for the pkgsrc tree. If you want to do it 14tree, and /usr/pkgsrc for the pkgsrc tree. If you want to do it
15unprivileged, see `* Unprivileged notes' below. 15unprivileged, see `* Unprivileged notes' below.
16 16
17XXX This currently works only for NetBSD. 17XXX This currently works only for NetBSD.
@@ -24,28 +24,29 @@ mk.conf. @@ -24,28 +24,29 @@ mk.conf.
24 24
25 $ cd /usr/src 25 $ cd /usr/src
26 $ ./build.sh -m evbppc tools 26 $ ./build.sh -m evbppc tools
27 $ ./build.sh -m evbppc distribution 27 $ ./build.sh -m evbppc distribution
28 28
29By default, the destdir will be /usr/obj/destdir.evbppc, and the 29By default, the destdir will be /usr/obj/destdir.evbppc, and the
30tooldir will be (say) /usr/obj/tooldir.NetBSD-6.1-amd64 if you're 30tooldir will be (say) /usr/obj/tooldir.NetBSD-6.1-amd64 if you're
31running NetBSD 6.1 on amd64. 31running NetBSD 6.1 on amd64.
32 32
33* Set up mk.conf 33* Set up mk.conf
34 34
35In addition to whatever else you want in your mk.conf for pkgsrc, add: 35In addition to whatever else you want in your mk.conf for pkgsrc, add:
36 36
37 # Cross-compile by default. (Alternatively, you can cross-build 37 # Cross-compile by default. (Alternatively, instead of having this
38 # packages with `make package USE_CROSS_COMPILE=no'.) 38 # setting in mk.conf, you can cross-build packages by just running
 39 # `make package USE_CROSS_COMPILE=yes'.)
39 # 40 #
40 # Note: This must use `?=' so it doesn't override pkgsrc's internal 41 # Note: This must use `?=' so it doesn't override pkgsrc's internal
41 # USE_CROSS_COMPILE=no when recursively building toolchain packages 42 # USE_CROSS_COMPILE=no when recursively building toolchain packages
42 # that have to run on the host. 43 # that have to run on the host.
43 USE_CROSS_COMPILE?= yes 44 USE_CROSS_COMPILE?= yes
44 45
45 # Point pkgsrc at the NetBSD tooldir and destdir for cross builds. 46 # Point pkgsrc at the NetBSD tooldir and destdir for cross builds.
46 TOOLDIR= /usr/obj/tooldir.NetBSD-6.1-amd64 47 TOOLDIR= /usr/obj/tooldir.NetBSD-6.1-amd64
47 CROSS_DESTDIR= /usr/obj/destdir.evbppc 48 CROSS_DESTDIR= /usr/obj/destdir.evbppc
48 49
49 # Specify the machine architecture of target packages. 50 # Specify the machine architecture of target packages.
50 CROSS_MACHINE_ARCH= powerpc 51 CROSS_MACHINE_ARCH= powerpc
51 52