clang supports referencing a symbol under a different name at the assembler level, like GCC. Also it supports __USER_LABEL_PREFIX__, like GCC (this is an underscore on 32-bit native Windows, but empty on 64-bit native Windows).
2020-08-16 Bruno Haible <br...@clisp.org> libc-config: Enable __REDIRECT macro also on clang. * lib/cdefs.h (__REDIRECT, __REDIRECT_NTH, __REDIRECT_NTHNL, __ASMNAME, __ASMNAME2): Define on clang like on GCC. diff --git a/lib/cdefs.h b/lib/cdefs.h index 67ad180..74da734 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -194,7 +194,7 @@ Example: int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ -#if defined __GNUC__ && __GNUC__ >= 2 +#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4) # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) # ifdef __cplusplus