[VDPAU] [PATCH 1/4] trace: use intermediate static library in the build
Emil Velikov
emil.l.velikov at gmail.com
Wed Mar 18 16:53:09 PDT 2015
On 18 March 2015 at 23:50, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Compile the source into a static library, to prevent C++ linkage. The
> latter of which unnesseserally pulls libm, libgcc_s and libstdc++ as
> dependencies.
>
> This also reduces the size of the stripped library by ~8% (51 > 47KiB).
>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
> trace/Makefile.am | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/trace/Makefile.am b/trace/Makefile.am
> index d134446..b4d34c1 100644
> --- a/trace/Makefile.am
> +++ b/trace/Makefile.am
> @@ -2,12 +2,19 @@ AM_CXXFLAGS = \
> -I$(top_srcdir)/include \
> $(X11_CFLAGS)
>
> +# Compile the source into a static library, to prevent C++ linkage. The
> +# latter of which unnesseserally pulls libm, libgcc_s and libstdc++ as
> +# dependencies.
> +
> +noinst_LTLIBRARIES = libfoo.la
> module_LTLIBRARIES = libvdpau_trace.la
>
> -libvdpau_trace_la_SOURCES = \
> +libfoo_la_SOURCES = \
> vdpau_trace.cpp
>
> +libvdpau_trace_la_SOURCES =
> libvdpau_trace_la_LIBADD = \
> + libfoo.la \
> $(DLOPEN_LIBS)
Should have mentioned that one can achieve this by manually setting up
the libvdpau_trace_la_LINKER variable. Considering I've never been
through that exercise I've decided not to experiment atm :-)
-Emil
More information about the VDPAU
mailing list