From patchwork Wed Nov 2 14:55:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 59789 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C617E3857371 for ; Wed, 2 Nov 2022 14:57:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C617E3857371 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667401039; bh=lUjO3hVpbC0OIoRHy1nAQt1zI4GHPdtrzBee4KK7zmQ=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=oHwpKJx7TtrpsprpS1dq+VcBExhKG4acO/+WDmZGxC0DDVuI44AV0055Lad+Ni70B nIChMXWSzi7QEVrvpqrYJIJ4+cHwNxrvhBbu//2f43aA8rtcRREw0sVzup92JGcK/z HBNvNUlOoKUPQXSKsA9o0mJMUamLKmhhm6eU0EgA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 3E583385782A for ; Wed, 2 Nov 2022 14:56:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3E583385782A Received: by mail-ot1-x330.google.com with SMTP id a13-20020a9d6e8d000000b00668d65fc44fso10410500otr.9 for ; Wed, 02 Nov 2022 07:56:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lUjO3hVpbC0OIoRHy1nAQt1zI4GHPdtrzBee4KK7zmQ=; b=wF/ncLYKwMxil/oy6YDRslpGAdrH8r3A+vaKH5NWR6jFOu21NBSznVHsmwS9LAUv0w 3alCWIvK+TQz+Q7qckBetB2nkIPzk1vxrt+Cd+Lh1cQx69jUultUA6H6HkgZv7JstX2T rUdNRJTFg/SYvbddu84K8nhLH+QaxPvoQV221jP+qTguklm4HfEHbjNPCz7yovQrS4Hl RtEpYXxsMxuOu1elGWtR6aM68QiiXg3gAfgWGJzo5PGzjbJVkLdAIg4f1oX3ELRw+pxc VkPvUNEicKfDlPt1L+v25vP8rOPkVzZTYRcwfSg1lFWbhu+fGglPOgq5aO+KYHEfhSCV eL1g== X-Gm-Message-State: ACrzQf0RdQxJbMWXvNvFSsQDW++x7p7md9tNqdZByQvv2CArjFftGX8k JnfXeA8oI70WUa3w0DV3G/u03vH5HTM22cyC X-Google-Smtp-Source: AMsMyM6eqhw8kQRQnvPQ6pN5QW2Unh7L1EPbN1IpoD4hDeT7Gqt06UyGUE1NkoQOXedosHZMUQeVhA== X-Received: by 2002:a05:6830:368e:b0:660:d53a:1e95 with SMTP id bk14-20020a056830368e00b00660d53a1e95mr12565407otb.120.1667400972380; Wed, 02 Nov 2022 07:56:12 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:a9f4:967f:f7c:c187:85d7]) by smtp.gmail.com with ESMTPSA id 37-20020a9d0328000000b00661af2f9a1asm5205767otv.49.2022.11.02.07.56.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 07:56:11 -0700 (PDT) To: libc-alpha@sourceware.org, Fangrui Song Subject: [PATCH v2 1/4] Disable __USE_EXTERN_INLINES for clang Date: Wed, 2 Nov 2022 11:55:56 -0300 Message-Id: <20221102145559.1962008-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102145559.1962008-1-adhemerval.zanella@linaro.org> References: <20221102145559.1962008-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" From: Fangrui Song 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. --- include/features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/features.h b/include/features.h index 123de9fd47..4a3fe34267 100644 --- a/include/features.h +++ b/include/features.h @@ -502,7 +502,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