[Pkg-xen-devel] [PATCH 08/12] debian/rules: Disable OCAML build when cross-building

Elliott Mitchell ehem+debian at m5p.com
Sat Jul 18 20:43:18 BST 2020


At this time cross-building for OCAML is broken.  Hopefully it may work
in future, but at this time it does not.

Signed-off-by: Elliott Mitchell <ehem+debian at m5p.com>
---
 debian/rules | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index cd30fb54f2..67fd74e89f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -202,11 +202,15 @@ override_dh_auto_configure:
 # separately.
 override_dh_auto_build:
 	$(MAKE) $(make_args_xen) xen
-	$(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n
+	$(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n OCAML_TOOLS=n
 	case $(flavour) in \
 	amd64|i386) \
 		$(MAKE) $(make_args_xen) -C tools/firmware/xen-dir ;; \
 	esac
+	@# OCAML cross-compilation is currently non-functional
+	if [ "$(DEB_BUILD_ARCH)" = "$(DEB_HOST_ARCH)" ]; then \
+		$(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n ; \
+	fi
 	touch debian/xen-tools-built.stamp
 
 # We keep the amount of fixup and messing about with debian/tmp/
@@ -216,7 +220,16 @@ override_dh_auto_build:
 override_dh_auto_install: $(TEMPLATED_FILES)
 	$(MAKE) $(make_args_xen) DESTDIR=$t install-xen
 	$(MAKE) $(make_args_tools) DESTDIR=$t \
-		install-{tools,docs} CONFIG_PV_SHIM=n
+		install-{tools,docs} CONFIG_PV_SHIM=n OCAML_TOOLS=n
+	:
+	@# OCAML doesn't work when cross-building
+	if [ "$(DEB_BUILD_ARCH)" = "$(DEB_HOST_ARCH)" ]; then \
+		$(MAKE) $(make_args_tools) DESTDIR=$t \
+			install-{tools,docs} CONFIG_PV_SHIM=n ; \
+	else \
+		touch $t/etc/xen/oxenstored.conf ; \
+		cp -l $t/usr/sbin/xl $t/usr/sbin/oxenstored ; \
+	fi
 	:
 	@# shim install target needs to be run separately because we
 	@# need to pass it the make_args_xen settings, in particular
-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg at m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445





More information about the Pkg-xen-devel mailing list