lttng-gen-tp: no linker flags when compiling .o
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 19 Apr 2021 19:49:19 +0000 (15:49 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 20 Apr 2021 14:06:44 +0000 (10:06 -0400)
The lttng-gen-tp scripts appends the content of the LDFLAGS variable to
the cc command use to compile object files, this is unnecessary since we
are not linking an executable or shared object and will generate
warnings with recent clang.

Change-Id: I87812028f145e0fc3848cf9d58de998abc98e57e
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/examples/gen-tp/Makefile
tools/lttng-gen-tp

index 07627f3deed10f9180c98a2c966dfce232efc187..39331854da356d3fbcce28a238823ae08b67c4e6 100644 (file)
@@ -39,7 +39,6 @@ sample.o: sample.c sample_tracepoint.h
        @if $(AM_V_P); then set -x; else echo "  CC       $@"; fi; \
                CPPFLAGS="$(AM_CPPFLAGS) $(CPPFLAGS)" \
                CFLAGS="$(AM_CFLAGS) $(CFLAGS)" \
-               LDFLAGS="$(AM_LDFLAGS) $(LDFLAGS)" \
                CC="$(CC)" \
                $(PYTHON) $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
 
index 84f4297e7b37243d8f079642db5f8702ace67f51..a62107f7b2006fcd876901f85aed5df2d7d9cb8f 100755 (executable)
@@ -138,12 +138,8 @@ class ObjFile:
             cflags = " " + os.environ['CFLAGS']
         else:
             cflags = ""
-        if 'LDFLAGS' in os.environ:
-            ldflags = " " + os.environ['LDFLAGS']
-        else:
-            ldflags = ""
 
-        command = cc + " -c" + cppflags + cflags + ldflags + " -I. -llttng-ust" + " -o " + self.outputFilename + " " + cFilename
+        command = cc + " -c" + cppflags + cflags + " -I. -o " + self.outputFilename + " " + cFilename
         if verbose:
             print("Compile command: " + command)
         subprocess.call(command.split())
This page took 0.025693 seconds and 4 git commands to generate.