2014-06-10 10:22:18 +00:00
|
|
|
#
|
2016-08-23 18:36:15 +00:00
|
|
|
# Copyright (C) 2006-2016 OpenWrt.org
|
2014-06-10 10:22:18 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=strace
|
2023-11-11 03:23:58 +00:00
|
|
|
PKG_VERSION:=6.6
|
2022-08-23 12:00:18 +00:00
|
|
|
PKG_RELEASE:=1
|
2014-06-10 10:22:18 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
2018-06-07 01:22:25 +00:00
|
|
|
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
2023-11-11 03:23:58 +00:00
|
|
|
PKG_HASH:=421b4186c06b705163e64dc85f271ebdcf67660af8667283147d5e859fc8a96c
|
2014-06-10 10:22:18 +00:00
|
|
|
|
2016-06-07 06:58:31 +00:00
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
2019-10-19 16:50:44 +00:00
|
|
|
PKG_LICENSE:=LGPL-2.1-or-later
|
|
|
|
PKG_LICENSE_FILES:=COPYING
|
2022-09-03 15:51:24 +00:00
|
|
|
PKG_CPE_ID:=cpe:/a:strace_project:strace
|
2014-06-10 10:22:18 +00:00
|
|
|
|
|
|
|
PKG_FIXUP:=autoreconf
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
|
2019-02-10 13:46:47 +00:00
|
|
|
PKG_CONFIG_DEPENDS := \
|
|
|
|
CONFIG_STRACE_LIBDW \
|
|
|
|
CONFIG_STRACE_LIBUNWIND
|
|
|
|
|
2014-06-10 10:22:18 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2022-07-11 01:00:59 +00:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
2014-06-10 10:22:18 +00:00
|
|
|
|
2015-07-19 14:59:16 +00:00
|
|
|
HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include
|
|
|
|
|
2015-07-19 14:59:09 +00:00
|
|
|
CONFIGURE_VARS+= \
|
|
|
|
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
|
|
|
|
CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
|
|
|
|
CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
|
|
|
|
CC_FOR_BUILD="$(HOST_CC)"
|
|
|
|
|
2014-06-10 10:22:18 +00:00
|
|
|
define Package/strace
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
TITLE:=System call tracer
|
2019-10-19 16:50:44 +00:00
|
|
|
URL:=https://strace.io/
|
2019-02-10 13:46:47 +00:00
|
|
|
DEPENDS:=+STRACE_LIBDW:libdw +STRACE_LIBUNWIND:libunwind
|
2014-06-10 10:22:18 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/strace/description
|
2019-10-19 16:50:44 +00:00
|
|
|
A useful diagnostic, instructional, and debugging tool. Allows you to track what
|
|
|
|
system calls a program makes while it is running.
|
2014-06-10 10:22:18 +00:00
|
|
|
endef
|
|
|
|
|
2016-06-09 02:04:24 +00:00
|
|
|
define Package/strace/config
|
2019-02-16 22:43:50 +00:00
|
|
|
choice
|
|
|
|
prompt "stack tracing support"
|
|
|
|
default STRACE_NONE
|
2019-02-10 13:46:47 +00:00
|
|
|
|
2019-02-16 22:43:50 +00:00
|
|
|
config STRACE_NONE
|
|
|
|
bool "None"
|
2019-02-10 13:46:47 +00:00
|
|
|
|
2019-02-16 22:43:50 +00:00
|
|
|
config STRACE_LIBDW
|
|
|
|
bool "libdw"
|
|
|
|
|
|
|
|
config STRACE_LIBUNWIND
|
|
|
|
bool "libunwind (experimental)"
|
|
|
|
endchoice
|
2016-06-09 02:04:24 +00:00
|
|
|
endef
|
|
|
|
|
2018-10-02 16:55:11 +00:00
|
|
|
CONFIGURE_ARGS += \
|
2019-02-10 13:46:47 +00:00
|
|
|
--with-libdw=$(if $(CONFIG_STRACE_LIBDW),yes,no) \
|
2020-08-24 09:47:52 +00:00
|
|
|
--with-libunwind=$(if $(CONFIG_STRACE_LIBUNWIND),yes,no) \
|
2021-10-31 16:39:50 +00:00
|
|
|
--enable-mpers=no \
|
|
|
|
--without-libselinux
|
2018-10-02 16:55:11 +00:00
|
|
|
|
2014-06-10 10:22:18 +00:00
|
|
|
MAKE_FLAGS := \
|
|
|
|
CCOPT="$(TARGET_CFLAGS)"
|
|
|
|
|
|
|
|
define Package/strace/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,strace))
|