[lttng-dev] [PATCH lttng-ust] Fix: Add --no-as-needed to the demo example's Makefile
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Fri Jun 14 17:35:13 EDT 2013
* Jérémie Galarneau (jeremie.galarneau at efficios.com) wrote:
> 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.
merged, thanks!
Mathieu
>
> Signed-off-by: Jérémie Galarneau <jeremie.galarneau at efficios.com>
> ---
> doc/examples/demo/Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/doc/examples/demo/Makefile b/doc/examples/demo/Makefile
> index 27ca92b..d55a1b1 100644
> --- a/doc/examples/demo/Makefile
> +++ b/doc/examples/demo/Makefile
> @@ -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 $@ $<
> --
> 1.8.3
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list