Hi Eduard,

Do you mind testing the patch and sending a "Tested-by" to the list if it
does the job for you?

Thank you for reporting and testing the issue.

Ping

On Wed, Mar 9, 2011 at 4:20 PM, Peter Hutterer <peter.hutte...@who-t.net>wrote:

> test/Makefile.am included src/Makefile.am for the driver sources. However,
> that also lead to the driver being built twice, once in src/ and once in
> test/. On make install, test/wacom_drv.so would overwrite the
> src/wacom_drv.so and thus install a driver with all static symbols compiled
> as non-static.
>
> This caused the VCOPY bug worked around in
> 9d227cd0bd985e7dcb7923974361145ba1d78713.
>
> Avoid this by moving the sources into a shared included Makefile and build
> an independent libwacom-test.la in the test directory.
>
> Reported-by: Eduard Hasenleithner <ehase...@gmail.com>
> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
> ---
>
> Thank you for investigating this, much appreciated. I was wondering why
> 9d227 was necessary, id didn't really make sense at the time.
> This one should do the job now.
>
>  src/Makefile.am  |   16 +++-------------
>  src/common.mk    |   15 +++++++++++++++
>  test/Makefile.am |   11 ++++++-----
>  3 files changed, 24 insertions(+), 18 deletions(-)
>  create mode 100644 src/common.mk
>
> diff --git a/src/Makefile.am b/src/Makefile.am
> index f3b9a5f..7d6ecf5 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -25,6 +25,8 @@
>  # _ladir passes a dummy rpath to libtool so the thing will actually link
>  # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a,
> etc.
>
> +include common.mk
> +
>  @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
>  @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
>  @DRIVER_NAME@_drv_ladir = @inputdir@
> @@ -32,16 +34,4 @@
>  AM_CPPFLAGS=-I$(top_srcdir)/include/
>  AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
>
> -@DRIVER_NAME@_drv_la_SOURCES = \
> -       $(top_srcdir)/src/xf86Wacom.c \
> -       $(top_srcdir)/src/xf86Wacom.h \
> -       $(top_srcdir)/src/wcmCommon.c \
> -       $(top_srcdir)/src/wcmConfig.c \
> -       $(top_srcdir)/src/wcmISDV4.c \
> -       $(top_srcdir)/src/wcmFilter.c \
> -       $(top_srcdir)/src/wcmFilter.h \
> -       $(top_srcdir)/src/xf86WacomDefs.h \
> -       $(top_srcdir)/src/wcmUSB.c \
> -       $(top_srcdir)/src/wcmXCommand.c \
> -       $(top_srcdir)/src/wcmValidateDevice.c \
> -       $(top_srcdir)/src/wcmTouchFilter.c
> +@DRIVER_NAME@_drv_la_SOURCES = $(DRIVER_SOURCES)
> diff --git a/src/common.mk b/src/common.mk
> new file mode 100644
> index 0000000..fae8d9f
> --- /dev/null
> +++ b/src/common.mk
> @@ -0,0 +1,15 @@
> +# shared makefile between src/Makefile.am and test/Makefile.am
> +
> +DRIVER_SOURCES= \
> +       $(top_srcdir)/src/xf86Wacom.c \
> +       $(top_srcdir)/src/xf86Wacom.h \
> +       $(top_srcdir)/src/wcmCommon.c \
> +       $(top_srcdir)/src/wcmConfig.c \
> +       $(top_srcdir)/src/wcmISDV4.c \
> +       $(top_srcdir)/src/wcmFilter.c \
> +       $(top_srcdir)/src/wcmFilter.h \
> +       $(top_srcdir)/src/xf86WacomDefs.h \
> +       $(top_srcdir)/src/wcmUSB.c \
> +       $(top_srcdir)/src/wcmXCommand.c \
> +       $(top_srcdir)/src/wcmValidateDevice.c \
> +       $(top_srcdir)/src/wcmTouchFilter.c
> diff --git a/test/Makefile.am b/test/Makefile.am
> index 1898fe3..5710bb8 100644
> --- a/test/Makefile.am
> +++ b/test/Makefile.am
> @@ -1,15 +1,16 @@
>  if UNITTESTS
> -include ../src/Makefile.am
> +include ../src/common.mk
>
>  check_PROGRAMS = wacom-tests
> -check_LTLIBRARRIES = @DRIVER_NAME@_drv.la
> -@DRIVER_NAME@_drv_la_CFLAGS = -DDISABLE_STATIC -I$(top_srcdir)/src
> $(XORG_CFLAGS) $(CWARNFLAGS) -fvisibility=default
> +check_LTLIBRARIES = libwacom-test.la
> +libwacom_test_la_SOURCES =$(DRIVER_SOURCES)
> +libwacom_test_la_CFLAGS = -DDISABLE_STATIC -I$(top_srcdir)/src
> $(XORG_CFLAGS) $(CWARNFLAGS) -fvisibility=default
>
>  TESTS=$(check_PROGRAMS)
>
>  INCLUDES = -I$(top_srcdir)/src
> -AM_CFLAGS += $(GLIB_CFLAGS)
> -TEST_LDADD=$(GLIB_LIBS) @DRIVER_NAME@_drv.la
> +AM_CFLAGS = $(GLIB_CFLAGS)
> +TEST_LDADD=$(GLIB_LIBS) libwacom-test.la
>  COMMON_SOURCES=fake-symbols.c fake-symbols.h
>
>  wacom_tests_LDADD=$(TEST_LDADD)
> --
> 1.7.4
>
>
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to