Fix: Add --no-as-needed to the demo example's Makefile
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 14 Jun 2013 21:33:47 +0000 (17:33 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 14 Jun 2013 21:34:08 +0000 (17:34 -0400)
Some distributions now ship with the --as-needed linker flag
set by default (Ubuntu 13.04). This will cause the linker to
remove the references to lttng-ust from the provider objects
thus causing the application to fail when preloading them.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/examples/demo/Makefile

index 27ca92b6704b32795e0259bb756ab8d8978b5063..d55a1b19ce6afbb48cea0273325e445a1f36e629 100644 (file)
@@ -43,13 +43,13 @@ tp2.o: tp2.c ust_tests_demo2.h
        $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) -fpic -c -o $@ $<
 
 lttng-ust-provider-ust-tests-demo.so: tp.o tp2.o
-       $(CC) -shared -o $@ $(LDFLAGS) -llttng-ust $^
+       $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) -llttng-ust $^
 
 tp3.o: tp3.c ust_tests_demo3.h
        $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) -fpic -c -o $@ $<
 
 lttng-ust-provider-ust-tests-demo3.so: tp3.o
-       $(CC) -shared -o $@ $(LDFLAGS) -llttng-ust $^
+       $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) -llttng-ust $^
 
 demo.o: demo.c
        $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) -c -o $@ $<
This page took 0.02474 seconds and 4 git commands to generate.