From 6e7b8f9412ac12225e441acbd5228e97c2e38ca7 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Sun, 23 Jan 2022 23:25:27 -0800 Subject: [PATCH] package/delve: support building as host package Users may want to debug Go programs using dlv on the host machine. Adds package host-delve and BR2_PACKAGE_HOST_DELVE. Signed-off-by: Christian Stewart Signed-off-by: Thomas Petazzoni --- package/Config.in.host | 1 + package/delve/Config.in.host | 7 +++++++ package/delve/delve.mk | 5 +++++ 3 files changed, 13 insertions(+) create mode 100644 package/delve/Config.in.host diff --git a/package/Config.in.host b/package/Config.in.host index 20034f6ee0..341e24926b 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -14,6 +14,7 @@ menu "Host utilities" source "package/cramfs/Config.in.host" source "package/cryptsetup/Config.in.host" source "package/dbus-python/Config.in.host" + source "package/delve/Config.in.host" source "package/dfu-util/Config.in.host" source "package/dos2unix/Config.in.host" source "package/dosfstools/Config.in.host" diff --git a/package/delve/Config.in.host b/package/delve/Config.in.host new file mode 100644 index 0000000000..dab5ca8914 --- /dev/null +++ b/package/delve/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_DELVE + bool "host delve" + depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS + help + Delve is a debugger for the Go programming language. + + https://github.com/go-delve/delve diff --git a/package/delve/delve.mk b/package/delve/delve.mk index 984d90a03c..4ca1786ffc 100644 --- a/package/delve/delve.mk +++ b/package/delve/delve.mk @@ -14,4 +14,9 @@ DELVE_TAGS = cgo DELVE_BUILD_TARGETS = cmd/dlv DELVE_INSTALL_BINS = $(notdir $(DELVE_BUILD_TARGETS)) +HOST_DELVE_TAGS = cgo +HOST_DELVE_BUILD_TARGETS = cmd/dlv +HOST_DELVE_INSTALL_BINS = $(notdir $(HOST_DELVE_BUILD_TARGETS)) + $(eval $(golang-package)) +$(eval $(host-golang-package))