From: Adhemerval Zanella Date: Fri, 17 Oct 2025 19:12:38 +0000 (-0300) Subject: Disable __USE_EXTERN_INLINES for clang X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e96e426cafb8f91aad357f3432535e0c6c19f038;p=thirdparty%2Fglibc.git Disable __USE_EXTERN_INLINES for clang clang does not allow to redefine attributes after function declaration. Although it work for external usage, its breaks the build for internal symbol that glibc provides as optimization (for instance bsearch with stdlib-bsearch.h or __cmsg_nxthdr). Disable such optimization for clang while building glibc. Reviewed-by: Sam James --- diff --git a/include/features.h b/include/features.h index 03b83cd34c..673c4036cd 100644 --- a/include/features.h +++ b/include/features.h @@ -536,7 +536,7 @@ /* Decide whether we can define 'extern inline' functions in headers. */ #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \ - && defined __extern_inline + && defined __extern_inline && !(defined __clang__ && defined _LIBC) # define __USE_EXTERN_INLINES 1 #endif