aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--libdrm_macros.h2
-rw-r--r--meson.build7
3 files changed, 6 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 762ca9f9..607d8597 100644
--- a/configure.ac
+++ b/configure.ac
@@ -535,6 +535,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([
535 535
536if test "x$HAVE_ATTRIBUTE_VISIBILITY" = xyes; then 536if test "x$HAVE_ATTRIBUTE_VISIBILITY" = xyes; then
537 AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__(("hidden"))]) 537 AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__(("hidden"))])
538else
539 AC_DEFINE(HAVE_VISIBILITY, 0)
538fi 540fi
539 541
540AC_SUBST(WARN_CFLAGS) 542AC_SUBST(WARN_CFLAGS)
diff --git a/libdrm_macros.h b/libdrm_macros.h
index 639d0904..211fab21 100644
--- a/libdrm_macros.h
+++ b/libdrm_macros.h
@@ -23,7 +23,7 @@
23#ifndef LIBDRM_LIBDRM_H 23#ifndef LIBDRM_LIBDRM_H
24#define LIBDRM_LIBDRM_H 24#define LIBDRM_LIBDRM_H
25 25
26#if defined(HAVE_VISIBILITY) 26#if HAVE_VISIBILITY
27# define drm_private __attribute__((visibility("hidden"))) 27# define drm_private __attribute__((visibility("hidden")))
28#else 28#else
29# define drm_private 29# define drm_private
diff --git a/meson.build b/meson.build
index 50daa1d0..826cd915 100644
--- a/meson.build
+++ b/meson.build
@@ -256,10 +256,9 @@ with_man_pages = with_man_pages != 'false' and prog_xslt.found() and prog_sed.fo
256# Used for tets 256# Used for tets
257prog_bash = find_program('bash') 257prog_bash = find_program('bash')
258 258
259if cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));''', 259config.set10('HAVE_VISIBILITY',
260 name : 'compiler supports __attribute__(("hidden"))') 260 cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));''',
261 config.set10('HAVE_VISIBILITY', true) 261 name : 'compiler supports __attribute__(("hidden"))'))
262endif
263 262
264foreach t : [ 263foreach t : [
265 [with_exynos, 'EXYNOS'], 264 [with_exynos, 'EXYNOS'],