[PATCH 09/11] alloc_buffer: Apply asm redirection before first use
Fangrui Song
maskray@google.com
Sat Oct 29 00:32:00 GMT 2022
On 2022-10-28, Adhemerval Zanella via Libc-alpha wrote:
>Compilers may not be able to apply asm redirections to functions after
>these functions are used for the first time, e.g. clang 13.
You may say "clang 15". (clang 15.0.x has been released and clang still doesn't support this.
I think this is very difficult to support.... https://maskray.me/blog/2021-10-10-when-can-glibc-be-built-with-clang#asm-label-after-first-use
"Clang's one-function-at-a-time parsing and code generation strategy.")
Thanks. This fixed
In file included from mntent.c:21:
../include/allocate_once.h:92:20: error: cannot apply asm label to function after its first use
libc_hidden_proto (__libc_allocate_once_slow)
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
./../include/libc-symbols.h:613:58: note: expanded from macro 'libc_hidden_proto'
# define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
~~~~~~~~~~~~~~^~~~~~~~~~~~~~
./../include/libc-symbols.h:513:19: note: expanded from macro 'hidden_proto'
__hidden_proto (name, , __GI_##name, ##attrs)
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./../include/libc-symbols.h:519:33: note: expanded from macro '__hidden_proto'
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Reviewed-by: Fangrui Song <maskray@google.com>
More information about the Libc-alpha
mailing list