[bootlin/training-materials updates] master: debugging: labs: fix and cleanup LTTng lab Makefile (43e105f8)
Luca Ceresoli
luca.ceresoli at bootlin.com
Thu Aug 24 21:57:44 CEST 2023
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/43e105f8eb2f8c14564c5cea3eb1834327b2347c
>---------------------------------------------------------------
commit 43e105f8eb2f8c14564c5cea3eb1834327b2347c
Author: Luca Ceresoli <luca.ceresoli at bootlin.com>
Date: Thu Aug 24 21:50:22 2023 +0200
debugging: labs: fix and cleanup LTTng lab Makefile
This Makefile has a wrong ${CC} before lttng-gen-tp, perhaps a leftover of
a former CC=${CC}, which is not needed due to the global CC. However the
global CC needs 'export' to work, thus add it.
Also remove -I. from the compiler command line as the crc_random-tp.h file
is local, so it can be included using '#include "..."' which does not need
-I.
Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
>---------------------------------------------------------------
43e105f8eb2f8c14564c5cea3eb1834327b2347c
lab-data/debugging/nfsroot/root/system_profiling/Makefile | 2 +-
.../debugging-system-wide-profiling.tex | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lab-data/debugging/nfsroot/root/system_profiling/Makefile b/lab-data/debugging/nfsroot/root/system_profiling/Makefile
index bc54bf59..369ef509 100644
--- a/lab-data/debugging/nfsroot/root/system_profiling/Makefile
+++ b/lab-data/debugging/nfsroot/root/system_profiling/Makefile
@@ -1,4 +1,4 @@
-CC=${CROSS_COMPILE}gcc
+export CC=${CROSS_COMPILE}gcc
crc_random: crc_random.c
${CC} $< -g3 -o $@
diff --git a/labs/debugging-system-wide-profiling/debugging-system-wide-profiling.tex b/labs/debugging-system-wide-profiling/debugging-system-wide-profiling.tex
index fcba5c3c..7a2e3a07 100644
--- a/labs/debugging-system-wide-profiling/debugging-system-wide-profiling.tex
+++ b/labs/debugging-system-wide-profiling/debugging-system-wide-profiling.tex
@@ -118,13 +118,13 @@ new rule and modifying the existing one to generate the tracepoints files using
\code{lttng-gen-tp}:
\begin{bashinput}
- CC=${CROSS_COMPILE}gcc
+ export CC=${CROSS_COMPILE}gcc
crc_random: crc_random.c crc_random-tp.o
- ${CC} $^ -g3 -I. -llttng-ust -o $@
+ ${CC} $^ -g3 -llttng-ust -o $@
crc_random-tp.o: crc_random-tp.tp
- ${CC} lttng-gen-t<
+ lttng-gen-tp $<
\end{bashinput}
You can then use the new tracepoints in your program to trace specific points
More information about the training-materials-updates
mailing list