From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id D731D3858006; Wed, 7 Feb 2024 14:04:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D731D3858006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707314654; bh=qpnCKfU1sNknNBIy8HXw0HdQmfsM1m089dyR6UjQYhg=; h=From:To:Subject:Date:From; b=J+QfTWOf1IvVKMPuscSiyotc0OBYjd4Tuyr57qD+Ja9/k7qcpoWKzRZG9u/iPfsuv uizoHAtaffSWZvW5fsLbLDEkpBYRqSnUSEqY/EWfYzvioix2o79RXv+RB4fMHH2z5Y GhcgYDN2Hq3qnMSBxneGm2l1lqdgJ0175u+pBN4Y= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] Disable __USE_EXTERN_INLINES for clang X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: c024a249e2964851d7dd7b09975f4d7984a1ab29 X-Git-Newrev: 91a93b8f5ce0501b54d48f7d1efe1f8c4e0a177c Message-Id: <20240207140414.D731D3858006@sourceware.org> Date: Wed, 7 Feb 2024 14:04:14 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=91a93b8f5ce0501b54d48f7d1efe1f8c4e0a177c commit 91a93b8f5ce0501b54d48f7d1efe1f8c4e0a177c Author: Adhemerval Zanella Date: Thu Oct 7 18:16:04 2021 -0700 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. Diff: --- include/features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/features.h b/include/features.h index d92503dfed..23e29b9f4d 100644 --- a/include/features.h +++ b/include/features.h @@ -523,7 +523,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