summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorriastradh <riastradh@pkgsrc.org>2022-04-10 19:54:02 +0000
committerriastradh <riastradh@pkgsrc.org>2022-04-10 19:54:02 +0000
commite5478902b33a7de6e8e7b0207efc59fff30b0f9e (patch)
treedcbc6531367d3a2bfb25dd89ecd99fcb5ba9b6f7 /doc
parent6692e9187e3f640da3e0479e3f61edc880730cb4 (diff)
downloadpkgsrc-e5478902b33a7de6e8e7b0207efc59fff30b0f9e.tar.gz
mk: Use CWRAPPERS_PREPEND for --sysroot.
Looks like maybe the -Wl,-rpath-link business isn't necessary after all -- will leave this as is until I find evidence otherwise. (joerg says it was a workaround for NetBSD toolchain parts that weren't properly adapted to use sysroot.) With this, revert cwrappers version dependency to what it was before. But keep it as TOOL_DEPENDS, not BUILD_DEPENDS.
Diffstat (limited to 'doc')
-rw-r--r--doc/HOWTO-use-crosscompile26
1 files changed, 21 insertions, 5 deletions
diff --git a/doc/HOWTO-use-crosscompile b/doc/HOWTO-use-crosscompile
index 6d96e6fedac..1c46b5ede3a 100644
--- a/doc/HOWTO-use-crosscompile
+++ b/doc/HOWTO-use-crosscompile
@@ -1,7 +1,7 @@
Cross-compilation in pkgsrc (user's guide) -*- outline -*-
Taylor R. Campbell <riastradh@NetBSD.org>
-$NetBSD: HOWTO-use-crosscompile,v 1.10 2022/04/04 11:23:18 riastradh Exp $
+$NetBSD: HOWTO-use-crosscompile,v 1.11 2022/04/10 19:54:02 riastradh Exp $
The following steps enable you to build binary packages for a machine
architecture other than the one you are building on. For example, you
@@ -61,14 +61,30 @@ In addition to whatever else you want in your mk.conf for pkgsrc, add:
MACHINE_ARCH= powerpc
.endif
-You can bootstrap pkgsrc or not; it shouldn't make a difference for
-cross-compilation. If you do, replace `make' by `bmake' below, of
-course.
-
XXX Some variables, notably LOCALBASE and other paths that get baked
into packages, cannot currently be set differently for native and
target packages.
+** Bootstrapped pkgsrc
+
+You can bootstrap pkgsrc or not; it shouldn't make a difference for
+cross-compilation. If you do:
+
+ - Replace `make' by `bmake' below.
+
+ - Make sure any ABI setting in mk.conf is conditionally set
+ appropriately.
+
+ For example, bootstrap on amd64 leaves ABI=64 in mk.conf, which must
+ be left empty or undefined for earmv7hf cross-builds. So you might
+ need:
+
+ .if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+ ABI= 64 # set for native amd64 build
+ .else
+ ABI= # empty for earmv7hf cross-build
+ .endif
+
* Make some packages
Now packages you build normally will be cross-compiled for the target: