[Mesa-stable] [Mesa-dev] [PATCH 2/6] anv: automake: use VISIBILITY_CFLAGS to restrict symbol visibility

Kenneth Graunke kenneth at whitecape.org
Thu Jul 28 08:15:53 UTC 2016


On Wednesday, July 27, 2016 2:02:51 PM PDT Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> Hide the internal symbols and annotate the vk_icdGetInstanceProcAddr as public
> since the loader needs it (as of v1 of the loader interface).
> 
> Cc: "12.0" <mesa-stable at lists.freedesktop.org>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> Adding VISIBILITY_CFLAGS to AM_CPPFLAGS feels dirty, yet we don't have C++
> programs so things are fine. Alternatively we could rename the AM_CPPFLAGS ?
> ---
>  src/intel/vulkan/Makefile.am  | 1 +
>  src/intel/vulkan/anv_device.c | 6 ++++--
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
> index fe7371e..10900c0 100644
> --- a/src/intel/vulkan/Makefile.am
> +++ b/src/intel/vulkan/Makefile.am
> @@ -43,6 +43,7 @@ noinst_LTLIBRARIES = $(PER_GEN_LIBS)
>  # The gallium includes are for the util/u_math.h include from main/macros.h
>  
>  AM_CPPFLAGS = \
> +	$(VISIBILITY_CFLAGS) \

CFLAGS shouldn't be in AM_CPPFLAGS, should they?  INTEL_CFLAGS and
VALGRIND_CFLAGS really don't belong here either...

>  	$(INTEL_CFLAGS) \
>  	$(VALGRIND_CFLAGS) \
>  	$(DEFINES) \
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index 2e91980..e445c96 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -653,13 +653,15 @@ PFN_vkVoidFunction anv_GetInstanceProcAddr(
>     return anv_lookup_entrypoint(pName);
>  }
>  
> -/* The loader wants us to expose a second GetInstanceProcAddr function
> - * to work around certain LD_PRELOAD issues seen in apps.
> +/* With version 1+ of the loader interface the ICD should expose
> + * vk_icdGetInstanceProcAddr to work around certain LD_PRELOAD issues seen in apps.
>   */
> +PUBLIC
>  VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(
>      VkInstance                                  instance,
>      const char*                                 pName);
>  
> +PUBLIC
>  VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(
>      VkInstance                                  instance,
>      const char*                                 pName)
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20160728/aab2af50/attachment.sig>


More information about the mesa-stable mailing list