From ec1adbb8cbf77babf59853b24460840e9895cf91 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 597071b5..319db79f 100644 --- a/doc/examples/easy-ust/Makefile +++ b/doc/examples/easy-ust/Makefile @@ -22,7 +22,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 b29eed4c..c03859b7 100644 --- a/doc/examples/gen-tp/Makefile +++ b/doc/examples/gen-tp/Makefile @@ -21,7 +21,7 @@ LIBS = -ldl -llttng-ust 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