From 6564d1395ccb6b44fd913a2f3db50a1d86197a2d Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 12 Oct 2018 09:13:43 +1000 Subject: [PATCH] virglrenderer: enable symbol visiblity. We have to link the gallium la file into the test code Reviewed-by: Jakob Bornecrantz --- configure.ac | 13 +++++++++++++ tests/Makefile.am | 2 +- vtest/Makefile.am | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index ff927c6..278a0d6 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,10 @@ AX_CHECK_COMPILE_FLAG([-Werror=missing-prototypes], [CFLAGS="$CFLAGS AX_CHECK_COMPILE_FLAG([-Wmissing-prototypes], [CFLAGS="$CFLAGS -Wmissing-prototypes"]) AX_CHECK_COMPILE_FLAG([-Werror=int-to-pointer-cast], [CFLAGS="$CFLAGS -Werror=int-to-pointer-cast"]) +AX_GCC_FUNC_ATTRIBUTE([visibility]) +AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [VISIBILITY_CFLAGS="-fvisibility=hidden"]) + + AC_MSG_CHECKING([for native Win32]) case "$host_os" in *mingw*|*cygwin*) @@ -145,6 +149,15 @@ AS_IF([test "x$epoxy_has_glx" = "x1" && test "x$enable_glx" != "xno"], [ AM_CONDITIONAL([HAVE_EPOXY_GLX], [test "x$epoxy_has_glx" = "xyes"]) AC_SUBST([DEFINES]) + +case "$host_os" in +cygwin*) + VISIBILITY_CFLAGS="" + ;; +esac + +AC_SUBST([VISIBILITY_CFLAGS]) + AC_CONFIG_FILES([ virglrenderer.pc Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index 592f0fb..0aa7c77 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,7 +4,7 @@ if BUILD_TESTS AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/gallium/include $(CHECK_CFLAGS) -I$(top_srcdir)/src/gallium/auxiliary $(DEFINES) -TEST_LIBS = libvrtest.la $(top_builddir)/src/libvirglrenderer.la $(CHECK_LIBS) +TEST_LIBS = libvrtest.la $(top_builddir)/src/gallium/auxiliary/libgallium.la $(top_builddir)/src/libvirglrenderer.la $(CHECK_LIBS) run_tests = test_virgl_init test_virgl_transfer test_virgl_resource test_virgl_cmd diff --git a/vtest/Makefile.am b/vtest/Makefile.am index e60956e..caaa4d7 100644 --- a/vtest/Makefile.am +++ b/vtest/Makefile.am @@ -24,4 +24,4 @@ virgl_test_server_SOURCES = \ vtest_protocol.h \ vtest.h -virgl_test_server_LDADD = $(top_builddir)/src/libvirglrenderer.la +virgl_test_server_LDADD = $(top_builddir)/src/gallium/auxiliary/libgallium.la $(top_builddir)/src/libvirglrenderer.la