forked from openwrt/openwrt
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dwarves is a set of tools that use the debugging information inserted in ELF binaries by compilers such as GCC. Utilities in the dwarves suite include pahole, which can be used to find alignment holes in structs and classes, and also extracts other information such as CPU cacheline alignment, helping pack those structures to achieve more cache hits. These tools are also used to encode and read the BTF type information format used with the bpf syscall, making this a Linux build dependency when using kernel BTF information. Signed-off-by: Tony Ambardar <itugrok@yahoo.com> Signed-off-by: Felix Fietkau <nbd@nbd.name> [bump to 1.23, add elfutils dep, drop host lib usage, drop cmake release target, use RM macro] Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
- Loading branch information
1 parent
6300313
commit 02850d7
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)) |