[Mesa-dev] [PATCH] mapi: Fix build with clang

Armin K krejzi at email.com
Sun Jan 24 02:53:31 PST 2016


From: Tomasz Paweł Gajc <tpgxyz at gmail.com>

Currently, building with clang fails due to:

error in backend: symbol 'x86_64_entry_start' is already defined

This patch fixes it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89599
---
 src/mapi/entry_x86-64_tls.h | 4 ++--
 src/mapi/entry_x86_tls.h    | 4 ++--
 src/mapi/entry_x86_tsd.h    | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mapi/entry_x86-64_tls.h b/src/mapi/entry_x86-64_tls.h
index 38faccc..82184d2 100644
--- a/src/mapi/entry_x86-64_tls.h
+++ b/src/mapi/entry_x86-64_tls.h
@@ -54,8 +54,8 @@ entry_patch_public(void)
 {
 }
 
-static char
-x86_64_entry_start[];
+extern char
+x86_64_entry_start[] __attribute__((visibility("hidden")));
 
 mapi_func
 entry_get_public(int slot)
diff --git a/src/mapi/entry_x86_tls.h b/src/mapi/entry_x86_tls.h
index 46d2ece..06afdd1 100644
--- a/src/mapi/entry_x86_tls.h
+++ b/src/mapi/entry_x86_tls.h
@@ -71,8 +71,8 @@ __asm__(".text");
 extern unsigned long
 x86_current_tls();
 
-static char x86_entry_start[];
-static char x86_entry_end[];
+extern char x86_entry_start[] __attribute__((visibility("hidden")));
+extern char x86_entry_end[] __attribute__((visibility("hidden")));
 
 void
 entry_patch_public(void)
diff --git a/src/mapi/entry_x86_tsd.h b/src/mapi/entry_x86_tsd.h
index ea7bacb..66f0b09 100644
--- a/src/mapi/entry_x86_tsd.h
+++ b/src/mapi/entry_x86_tsd.h
@@ -58,8 +58,8 @@ __asm__(".balign 32\n"
 #include <string.h>
 #include "u_execmem.h"
 
-static const char x86_entry_start[];
-static const char x86_entry_end[];
+extern const char x86_entry_start[] __attribute__((visibility("hidden")));
+extern const char x86_entry_end[] __attribute__((visibility("hidden")));
 
 void
 entry_patch_public(void)
-- 
2.7.0



More information about the mesa-dev mailing list