[LLVMdev] [PATCH 2/2 v3] add visibility hidden to tls entry points

Sedat Dilek sedat.dilek at gmail.com
Tue Feb 17 04:32:48 PST 2015


On Tue, Feb 17, 2015 at 1:26 PM, Marc Dietrich <marvin24 at gmx.de> wrote:
> Am Dienstag, 17. Februar 2015, 13:13:28 schrieb Sedat Dilek:
>> 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=''
>
> the problem here is that you are using "-v" flag which generates some warning
> output. The result is that *all* attribute detection fails. Remove it and try
> again.
>

Looks good, now.

$ grep -i visibility config.log
configure:18401: checking for __attribute__((visibility))
| #define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
| #define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
| #define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
| #define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
| #define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
| #define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
| #define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
| #define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
ax_cv_have_func_attribute_visibility=yes
DEFS='-DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\"
-DPACKAGE_VERSION=\"10.4.4\" -DPACKAGE_STRING=\"Mesa\ 10.4.4\"
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\"
-DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.4.4\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\"
-DYYTEXT_POINTER=1 -DHAVE___BUILTIN_BSWAP32=1
-DHAVE___BUILTIN_BSWAP64=1 -DHAVE___BUILTIN_CLZ=1
-DHAVE___BUILTIN_CLZLL=1 -DHAVE___BUILTIN_CTZ=1
-DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1
-DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1
-DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE___BUILTIN_UNREACHABLE=1
-DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1
-DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1
-DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1 -DHAVE_DLADDR=1 -DHAVE_PTHREAD=1
-DHAVE_LIBEXPAT=1'
VISIBILITY_CFLAGS='-fvisibility=hidden'
VISIBILITY_CXXFLAGS='-fvisibility=hidden'
#define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1

- Sedat -




More information about the llvm-dev mailing list