Sedat Dilek
2015-Feb-17 10:58 UTC
[LLVMdev] [PATCH 2/2 v3] add visibility hidden to tls entry points
On Tue, Feb 17, 2015 at 10:40 AM, Marc Dietrich <marvin24 at gmx.de> wrote:> Avoid redefined symbol errors in clang. Based on a suggestion from > Rafael Ávila de Espíndola <rafael.espindola at gmail.com> in > http://llvm.org/bugs/show_bug.cgi?id=19778. > > Signed-off-by: Marc Dietrich <marvin24 at gmx.de> > --- > v2: - no change > v3: - include util directory in Makefile.am in order to avoid relative > include paths, > - make tls entry points array const >I adapted this patch as v4 to fit mesa v10.4.4, but it fails (see log-file in attached tarball). - Sedat -> src/mapi/Makefile.am | 1 + > src/mapi/entry_x86-64_tls.h | 4 ++-- > src/mapi/entry_x86_tls.h | 5 +++-- > src/mapi/entry_x86_tsd.h | 5 +++-- > 4 files changed, 9 insertions(+), 6 deletions(-) > > diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am > index 6794682..c42ed52 100644 > --- a/src/mapi/Makefile.am > +++ b/src/mapi/Makefile.am > @@ -45,6 +45,7 @@ AM_CPPFLAGS = \ > $(SELINUX_CFLAGS) \ > -I$(top_srcdir)/include \ > -I$(top_srcdir)/src/mapi \ > + -I$(top_srcdir)/src/util \ > -I$(top_builddir)/src/mapi > > include Makefile.sources > diff --git a/src/mapi/entry_x86-64_tls.h b/src/mapi/entry_x86-64_tls.h > index 71e9d60..2c5d64d 100644 > --- a/src/mapi/entry_x86-64_tls.h > +++ b/src/mapi/entry_x86-64_tls.h > @@ -25,6 +25,7 @@ > * Chia-I Wu <olv at lunarg.com> > */ > > +#include "macros.h" > #include "u_macros.h" > > __asm__(".text\n" > @@ -62,8 +63,7 @@ entry_patch_public(void) > { > } > > -static char > -x86_64_entry_start[]; > +extern const char HIDDEN x86_64_entry_start[]; > > mapi_func > entry_get_public(int slot) > diff --git a/src/mapi/entry_x86_tls.h b/src/mapi/entry_x86_tls.h > index fa7bc15..a66edec 100644 > --- a/src/mapi/entry_x86_tls.h > +++ b/src/mapi/entry_x86_tls.h > @@ -26,6 +26,7 @@ > */ > > #include <string.h> > +#include "macros.h" > #include "u_macros.h" > > __asm__(".text"); > @@ -72,8 +73,8 @@ __asm__(".text"); > extern unsigned long > x86_current_tls(); > > -static char x86_entry_start[]; > -static char x86_entry_end[]; > +extern const char HIDDEN x86_entry_start[]; > +extern const char HIDDEN x86_entry_end[]; > > void > entry_patch_public(void) > diff --git a/src/mapi/entry_x86_tsd.h b/src/mapi/entry_x86_tsd.h > index ece00fa..1de2991 100644 > --- a/src/mapi/entry_x86_tsd.h > +++ b/src/mapi/entry_x86_tsd.h > @@ -25,6 +25,7 @@ > * Chia-I Wu <olv at lunarg.com> > */ > > +#include "macros.h" > #include "u_macros.h" > > #define X86_ENTRY_SIZE 32 > @@ -59,8 +60,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 HIDDEN x86_entry_start[]; > +extern const char HIDDEN x86_entry_end[]; > > void > entry_patch_public(void) > -- > 2.2.2 >-------------- next part -------------- A non-text attachment was scrubbed... Name: for-marvin24.tar.gz Type: application/x-gzip Size: 12345 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150217/b0e02091/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: for-marvin24.tar.gz.sha256sum Type: application/octet-stream Size: 86 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150217/b0e02091/attachment.obj>
Marc Dietrich
2015-Feb-17 11:38 UTC
[LLVMdev] [PATCH 2/2 v3] add visibility hidden to tls entry points
Am Dienstag, 17. Februar 2015, 11:58:06 schrieb Sedat Dilek:> On Tue, Feb 17, 2015 at 10:40 AM, Marc Dietrich <marvin24 at gmx.de> wrote: > > Avoid redefined symbol errors in clang. Based on a suggestion from > > Rafael Ávila de Espíndola <rafael.espindola at gmail.com> in > > http://llvm.org/bugs/show_bug.cgi?id=19778. > > > > Signed-off-by: Marc Dietrich <marvin24 at gmx.de> > > --- > > v2: - no change > > v3: - include util directory in Makefile.am in order to avoid relative > > > > include paths, > > > > - make tls entry points array const > > I adapted this patch as v4 to fit mesa v10.4.4, but it fails (see > log-file in attached tarball).the configure output says that visibility is not supported by your clang. Interestingly, it is supported here (also clang 3.6 from yesterday). What does config.log say about it? Marc -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: This is a digitally signed message part. URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150217/f400d517/attachment.sig>
Sedat Dilek
2015-Feb-17 11:42 UTC
[LLVMdev] [PATCH 2/2 v3] add visibility hidden to tls entry points
On Tue, Feb 17, 2015 at 12:38 PM, Marc Dietrich <marvin24 at gmx.de> wrote:> Am Dienstag, 17. Februar 2015, 11:58:06 schrieb Sedat Dilek: >> On Tue, Feb 17, 2015 at 10:40 AM, Marc Dietrich <marvin24 at gmx.de> wrote: >> > Avoid redefined symbol errors in clang. Based on a suggestion from >> > Rafael Ávila de Espíndola <rafael.espindola at gmail.com> in >> > http://llvm.org/bugs/show_bug.cgi?id=19778. >> > >> > Signed-off-by: Marc Dietrich <marvin24 at gmx.de> >> > --- >> > v2: - no change >> > v3: - include util directory in Makefile.am in order to avoid relative >> > >> > include paths, >> > >> > - make tls entry points array const >> >> I adapted this patch as v4 to fit mesa v10.4.4, but it fails (see >> log-file in attached tarball). > > the configure output says that visibility is not supported by your clang. > Interestingly, it is supported here (also clang 3.6 from yesterday). What does > config.log say about it? >Unfortunately, I have killed the build-dir and trying the patch from FreeBSD. I will rebuild and send you my config.log. Attached is my build-script for my llvm-toolchain. - Sedat - -------------- next part -------------- A non-text attachment was scrubbed... Name: build_llvm-toolchain.sh Type: application/x-sh Size: 1355 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150217/cb4858ac/attachment.sh>
Sedat Dilek
2015-Feb-17 12:13 UTC
[LLVMdev] [PATCH 2/2 v3] add visibility hidden to tls entry points
On Tue, Feb 17, 2015 at 12:38 PM, Marc Dietrich <marvin24 at gmx.de> wrote:> Am Dienstag, 17. Februar 2015, 11:58:06 schrieb Sedat Dilek: >> On Tue, Feb 17, 2015 at 10:40 AM, Marc Dietrich <marvin24 at gmx.de> wrote: >> > Avoid redefined symbol errors in clang. Based on a suggestion from >> > Rafael Ávila de Espíndola <rafael.espindola at gmail.com> in >> > http://llvm.org/bugs/show_bug.cgi?id=19778. >> > >> > Signed-off-by: Marc Dietrich <marvin24 at gmx.de> >> > --- >> > v2: - no change >> > v3: - include util directory in Makefile.am in order to avoid relative >> > >> > include paths, >> > >> > - make tls entry points array const >> >> I adapted this patch as v4 to fit mesa v10.4.4, but it fails (see >> log-file in attached tarball). > > the configure output says that visibility is not supported by your clang. > Interestingly, it is supported here (also clang 3.6 from yesterday). What does > config.log say about it? >Here is my config.log. $ grep -i visibility config.log configure:18401: checking for __attribute__((visibility)) ax_cv_have_func_attribute_visibility=no VISIBILITY_CFLAGS='' VISIBILITY_CXXFLAGS='' - Sedat - -------------- next part -------------- A non-text attachment was scrubbed... Name: config.log Type: text/x-log Size: 325727 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150217/61facd8b/attachment.bin>
Maybe Matching Threads
- [LLVMdev] [PATCH 0/2 v3] add visibility hidden to tls entry points
- [LLVMdev] [PATCH 1/2 v3] configure: add visibility macro detection to configure
- [LLVMdev] [PATCH 2/2 v3] add visibility hidden to tls entry points
- [LLVMdev] [Mesa-dev] [PATCH 1/2 v3] configure: add visibility macro detection to configure
- [LLVMdev] [PATCH 2/2 v3] add visibility hidden to tls entry points