From fe09e87939cd73206aab807b5d729ff4a28a6ad6 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 18 Apr 2012 16:17:56 -0400 Subject: [PATCH] Fix: examples Makefiles should pass $(LIBS) at last Fixes #210 Description Since Ubuntu 11.10, the "--as-needed" option is given by default to ld (linker). This option breaks the makefiles given with the userspace tracing examples. Therefore the libraries against which the program should be linked should be passed at last: $(CC) -o $@ $^ $(LIBS) Signed-off-by: Mathieu Desnoyers --- doc/examples/easy-ust/Makefile | 2 +- doc/examples/gen-tp/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/examples/easy-ust/Makefile b/doc/examples/easy-ust/Makefile index 3d043df4..1e3c9412 100644 --- a/doc/examples/easy-ust/Makefile +++ b/doc/examples/easy-ust/Makefile @@ -23,7 +23,7 @@ CFLAGS = -I. all: sample sample: sample.o tp.o - $(CC) $(LIBS) -o $@ $^ + $(CC) -o $@ $^ $(LIBS) sample.o: sample.c sample_component_provider.h $(CC) $(CFLAGS) -c -o $@ $< diff --git a/doc/examples/gen-tp/Makefile b/doc/examples/gen-tp/Makefile index 518f0174..127fb95f 100644 --- a/doc/examples/gen-tp/Makefile +++ b/doc/examples/gen-tp/Makefile @@ -23,7 +23,7 @@ LIBS = -ldl -llttng-ust #On Linux all: sample sample: sample.o sample_tracepoint.o - $(CC) $(LIBS) -o $@ $^ + $(CC) -o $@ $^ $(LIBS) sample.o: sample.c sample_tracepoint.h $(CC) $(CFLAGS) -c -o $@ $< -- 2.34.1