From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 91F80385770B; Tue, 25 Mar 2025 20:20:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 91F80385770B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1742934005; bh=VvmCY9DAyiDwm+7993X2bzfMc2uWHwkwt3OvfAEppok=; h=From:To:Subject:Date:From; b=uPJOVJgb+kElOc6GckIZlReVZZ5J2hDHjAEXfUwFraJQGE4agU7qBJnk2bUbaUeVb Vem3+7HkmbkK8Msrkw61fIXepdqU7JO3Hx3z6WSQ8VFSJP30BEx3ZNNRRA/L/Z9zt3 QdOxV1ot1NciXYNl8IErpdSxwuhepM1A+BDzNPh8= 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: 6fa08f6c28aa569508b7bd8e75162a39b405d15d X-Git-Newrev: 111d44f2ac29ebc5958cf3db6e85d989e1046b7d Message-Id: <20250325202005.91F80385770B@sourceware.org> Date: Tue, 25 Mar 2025 20:20:04 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=111d44f2ac29ebc5958cf3db6e85d989e1046b7d commit 111d44f2ac29ebc5958cf3db6e85d989e1046b7d 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 44bc4bbc85..ea78d3fb91 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