Browse Source

package/strace: add missing libunwind optional dependency

This improve the reproducible build.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
[Thomas: mention the libunwind dependency as being needed for 'strace
-k' in the Config.in help text, as suggested by Thomas De
Schampheleire.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Romain Naour 7 năm trước cách đây
mục cha
commit
0577bcb06f

+ 3 - 0
package/strace/Config.in

@@ -7,6 +7,9 @@ config BR2_PACKAGE_STRACE
 	  Allows you to track what system calls a program makes
 	  Allows you to track what system calls a program makes
 	  while it is running.
 	  while it is running.
 
 
+	  If you want 'strace -k' to work, make sure to enable the
+	  'libunwind' package.
+
 	  https://strace.io
 	  https://strace.io
 
 
 comment "strace needs a toolchain w/ headers >= 4.0 on nios2"
 comment "strace needs a toolchain w/ headers >= 4.0 on nios2"

+ 7 - 0
package/strace/strace.mk

@@ -11,6 +11,13 @@ STRACE_LICENSE = BSD-3-Clause
 STRACE_LICENSE_FILES = COPYING
 STRACE_LICENSE_FILES = COPYING
 STRACE_CONF_OPTS = --enable-mpers=check
 STRACE_CONF_OPTS = --enable-mpers=check
 
 
+ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
+STRACE_DEPENDENCIES += libunwind
+STRACE_CONF_OPTS += --with-libunwind
+else
+STRACE_CONF_OPTS += --without-libunwind
+endif
+
 define STRACE_REMOVE_STRACE_GRAPH
 define STRACE_REMOVE_STRACE_GRAPH
 	rm -f $(TARGET_DIR)/usr/bin/strace-graph
 	rm -f $(TARGET_DIR)/usr/bin/strace-graph
 endef
 endef