From c9a3019796caed959028d9fe531d5f224c1fb791 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Fri, 19 Jan 2018 12:23:55 -0800 Subject: Add clang version of __hidden_proto --- include/libc-symbols.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 6137304..eb4dbbe 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -459,9 +459,19 @@ for linking") __hidden_proto (name, , __GI_##name, ##attrs) # define hidden_tls_proto(name, attrs...) \ __hidden_proto (name, __thread, __GI_##name, ##attrs) +#ifndef __clang__ # define __hidden_proto(name, thread, internal, attrs...) \ extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \ __hidden_proto_hiddenattr (attrs); +#else +# define __hidden_proto(name, thread, internal, attrs...) \ + extern thread __typeof (name) name \ + __hidden_proto_hiddenattr (attrs); \ + _Pragma (__redefine(name, internal)) +/* Note that this macro does not use __hidden_asmname, since it produces a string. */ +# define __redefine(name, internal) __stringize(redefine_extname name internal) +# define __stringize(X) #X +#endif # define __hidden_asmname(name) \ __hidden_asmname1 (__USER_LABEL_PREFIX__, name) # define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name) -- cgit v1.1