From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id AC27C394D8A6; Thu, 28 Sep 2023 17:49:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC27C394D8A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695923350; bh=aDs6rjqZCgeZH2YHwbEv4WvYs/jMtWdqEW1FB5v6kg8=; h=From:To:Subject:Date:From; b=EO0flhIFykhMDp7YlNNyXiVj/YdnoDxeaW0czZViRrVdWAnWcfg3U7+6/U7v74E2J DblR1tf4GuLkqVcFZm4S75VCkzDJ/P3XMWtqTtKq6jXvxxdZQeJmUx9YAPqGKXvMUL suEZTlIN4Bxv8fcH/CRCYVagFwXH+GtjoZ1zl8g4= 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: 9175344b69f63546b020cc150cf1805a3ecbf5e9 X-Git-Newrev: 6e102459e53135b42d7d6c16b2b87778f1c620ab Message-Id: <20230928174910.AC27C394D8A6@sourceware.org> Date: Thu, 28 Sep 2023 17:49:10 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6e102459e53135b42d7d6c16b2b87778f1c620ab commit 6e102459e53135b42d7d6c16b2b87778f1c620ab 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 7c51b4a2e4..a94fc1b3a4 100644 --- a/include/features.h +++ b/include/features.h @@ -515,7 +515,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