Skip to content

Commit f94f853

Browse files
committed
Merge tag 'trace-tools-v7.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull RTLA fixes from Steven Rostedt: - Fix missing unistd include A missing #include <unistd.h> broke build on uclibc systems. Add the include to fix it. - Fix missing tools/lib/ctype.c dependency RTLA links tools/lib/string.c as a dependency of libsubcmd, some of its functions require _ctype. Link tools/lib/ctype.c as well, to fix build without GCC LTO. * tag 'trace-tools-v7.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: rtla: Also link in ctype.c rtla: Fix missing unistd include
2 parents 0f26556 + cd9993d commit f94f853

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

tools/tracing/rtla/Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ else
4545
LIB_OUTPUT = $(CURDIR)/lib
4646
endif
4747

48+
LIB_CTYPE = $(LIB_OUTPUT)/ctype.o
49+
LIB_CTYPE_SRC = $(srctree)/tools/lib/ctype.c
50+
4851
LIB_STRING = $(LIB_OUTPUT)/string.o
4952
LIB_STRING_SRC = $(srctree)/tools/lib/string.c
5053

@@ -117,12 +120,12 @@ tests/bpf/bpf_action_map.o: tests/bpf/bpf_action_map.c
117120
$(Q)echo "BPF skeleton support is disabled, skipping tests/bpf/bpf_action_map.o"
118121
endif
119122

120-
$(RTLA): $(RTLA_IN) $(LIBSUBCMD) $(LIB_STRING) $(LIB_STR_ERROR_R)
121-
$(QUIET_LINK)$(CC) $(LDFLAGS) -o $(RTLA) $(RTLA_IN) $(LIBSUBCMD) $(LIB_STRING) $(LIB_STR_ERROR_R) $(EXTLIBS)
123+
$(RTLA): $(RTLA_IN) $(LIBSUBCMD) $(LIB_CTYPE) $(LIB_STRING) $(LIB_STR_ERROR_R)
124+
$(QUIET_LINK)$(CC) $(LDFLAGS) -o $(RTLA) $(RTLA_IN) $(LIBSUBCMD) $(LIB_CTYPE) $(LIB_STRING) $(LIB_STR_ERROR_R) $(EXTLIBS)
122125

123-
static: $(RTLA_IN) $(LIBSUBCMD) $(LIB_STRING) $(LIB_STR_ERROR_R)
126+
static: $(RTLA_IN) $(LIBSUBCMD) $(LIB_CTYPE) $(LIB_STRING) $(LIB_STR_ERROR_R)
124127
$(eval LDFLAGS += -static)
125-
$(QUIET_LINK)$(CC) -static $(LDFLAGS) -o $(RTLA)-static $(RTLA_IN) $(LIBSUBCMD) $(LIB_STRING) $(LIB_STR_ERROR_R) $(EXTLIBS)
128+
$(QUIET_LINK)$(CC) -static $(LDFLAGS) -o $(RTLA)-static $(RTLA_IN) $(LIBSUBCMD) $(LIB_CTYPE) $(LIB_STRING) $(LIB_STR_ERROR_R) $(EXTLIBS)
126129

127130
rtla.%: fixdep FORCE
128131
make -f $(srctree)/tools/build/Makefile.build dir=. $@
@@ -150,6 +153,9 @@ $(LIB_STR_ERROR_R): $(LIB_STR_ERROR_R_SRC) | $(LIB_OUTPUT)
150153
$(LIB_STRING): $(LIB_STRING_SRC) | $(LIB_OUTPUT)
151154
$(QUIET_CC)$(CC) $(CFLAGS) -c -o $@ $<
152155

156+
$(LIB_CTYPE): $(LIB_CTYPE_SRC) | $(LIB_OUTPUT)
157+
$(QUIET_CC)$(CC) $(CFLAGS) -c -o $@ $<
158+
153159
libsubcmd-clean:
154160
$(call QUIET_CLEAN, libsubcmd)
155161
$(Q)$(RM) -r -- $(LIBSUBCMD_OUTPUT)

tools/tracing/rtla/src/common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <signal.h>
66
#include <stdlib.h>
77
#include <string.h>
8+
#include <unistd.h>
89
#include <sys/sysinfo.h>
910

1011
#include "common.h"

0 commit comments

Comments
 (0)