diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile | 2 | ||||
-rw-r--r-- | tools/dwarves/Makefile | 35 |
2 files changed, 37 insertions, 0 deletions
diff --git a/tools/Makefile b/tools/Makefile index 416039cf38..507971c6d5 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -84,7 +84,9 @@ endif ifeq ($(HOST_OS),Darwin) tools-y += bash else + $(curdir)/dwarves/compile += $(curdir)/elfutils/compile $(curdir)/elfutils/compile := $(curdir)/zlib/compile + tools-$(CONFIG_DWARVES) += dwarves tools-y += elfutils endif diff --git a/tools/dwarves/Makefile b/tools/dwarves/Makefile new file mode 100644 index 0000000000..41f0532701 --- /dev/null +++ b/tools/dwarves/Makefile @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: GPL-2.0-only + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dwarves + +PKG_SOURCE_VERSION:=v1.23 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/devel/pahole/pahole.git +PKG_MIRROR_HASH:=6ab1bb1dbdf6c73ffcf485d909229dc1da1a3d24efd213e92c56489b58d6a4bd +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING + +HOST_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/cmake.mk + +CMAKE_HOST_OPTIONS += \ + -D__LIB=lib \ + -DCMAKE_INSTALL_RPATH="$(STAGING_DIR_HOST)/lib" \ + -DCMAKE_SKIP_RPATH=FALSE + +define Host/Clean + $(RM) $(STAGING_DIR_HOST)/bin/{codiff,ctracer,dtagnames,pahole,pdwtags} + $(RM) $(STAGING_DIR_HOST)/bin/{pfunct,pglobal,prefcnt,scncopy,syscse} + $(RM) $(STAGING_DIR_HOST)/bin/{ostra-cg,btfdiff,fullcircle} + $(RM) $(STAGING_DIR_HOST)/lib/libdwarves*.so* + $(RM) $(STAGING_DIR_HOST)/share/man/man1/pahole.1 + rm -rf $(STAGING_DIR_HOST)/include/dwarves + rm -rf $(STAGING_DIR_HOST)/share/dwarves + $(call Host/Clean/Default) +endef + +$(eval $(call HostBuild)) |