Received: by 2002:a05:6512:2355:0:0:0:0 with SMTP id p21csp205091lfu; Wed, 30 Mar 2022 20:53:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzceg7kj8J55iJZidedF73VRlAI2cUTNXYQVnvifvQdsET10rjBjoEVsarvC4OLeP3TXPcH X-Received: by 2002:a17:902:a981:b0:156:229d:6834 with SMTP id bh1-20020a170902a98100b00156229d6834mr13792813plb.128.1648698815186; Wed, 30 Mar 2022 20:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648698815; cv=none; d=google.com; s=arc-20160816; b=KCtxO/bCNnHQ/xF27aK/BIwNphK+z9Z7XnO5Quj0zgjIGHo5pfY8+EgB2Fm0Q2QN3A J5oc3Y6W7+shyjjj6wcWs7Zvpc3tQ5d6hKPpVXBeSXzo8rAI20gkBa08JZ3yoGELbUHL bTp6UejS4WhzDeBsW+qDz7ywrR+FrWD5Q08FO5Weya8DSdYFV91yhTbNFc7Mn+Qsz/F/ YQ4GbnYQBOkNyPmVfrV7PL3VqUgBrpnjPEfvigdAimfEZWSWEhvdRH46f2BI5qMp9zO+ Yp6zx1SDZfijL7Gj0rsXn9foRxmeWgwkhxT6m/dylerqtb3Ux397/KFLX0M3dUz2GqSY Vfew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FHhm7FZ6J8di5qg6g8vfhfYQfn/ghUeU0M+WPSqGiCc=; b=ZIEwomNniazmSaUkTSuNDWiMNrz/g+6Z4AWyLlMMHoNqNRwi+U5pCAmwIz0RDQYSAc AdGeVG5fCBm+gerfkIitSn/8fKCZBo6igUqE5r8yGfyJsfuDMLNJwyGACRNsVNJZRQxz 6lWBC4OIpap3gvSKPbvwqVLusY2838EUk0iW9erSiSkQ+e9/vzemJXmmgFiRQyvDooL5 X0J/7OhCz8c5hoU28ibLrVXY38fKuWx7kYbudJcVoSccIam8iq/W5Vn7qJ3fD8xNWXYI Yi62Cx9Fkj11sjj2STkAtcJRy3iEuO8aQBnSfDC8DNhNkJf/9G1O+JUC4KyJXIogL2Et dG0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I3vHdiBi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d4-20020a63f244000000b003816043f054si23051606pgk.585.2022.03.30.20.53.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:53:35 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I3vHdiBi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 792D7158D88; Wed, 30 Mar 2022 20:06:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351859AbiC3XsA (ORCPT + 99 others); Wed, 30 Mar 2022 19:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351881AbiC3Xrx (ORCPT ); Wed, 30 Mar 2022 19:47:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BCB962A38; Wed, 30 Mar 2022 16:46:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E703C61835; Wed, 30 Mar 2022 23:46:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B30F2C340EC; Wed, 30 Mar 2022 23:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648683966; bh=uKYOWCNiJwOEjCoRKb6g6YV42LmzgDRTIg6qPpnEHkY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I3vHdiBi0jcpYheTDatiqR+gw+80pR/T/bIjzUWsbIFZfntE99R4wqw+EEkey6SLh eS/Rv6beB7qtmqyZIspDp/SaXLgZCKWuK5U48fuhITXQtARsGCjfOzfkfl9V2wIIp8 fFROFTaPbz6m/pZaall+y5vz3kKlCc+OIDYFgxUtKmqyHlLW1XwEFNaM44q698VXVe nkXFaIqTJnmoNavy1ooUs/oXG899cpFcrn0Mei8mT8QUknWX0zA8lXW4y5DK242prO ZmVQVzyaeugF0wsxdMn9DCVfqvGl0mPOpA9iC8j6NT5nawL3yr2zMU5ytyml7l0P8B ItO1C8b5uu5yA== From: Nathan Chancellor To: Masahiro Yamada , Nick Desaulniers , Richard Weinberger , Anton Ivanov , Johannes Berg , Kees Cook Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-um@lists.infradead.org, llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor Subject: [PATCH 1/2] kbuild: Remove '-mno-global-merge' Date: Wed, 30 Mar 2022 16:45:27 -0700 Message-Id: <20220330234528.1426991-2-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220330234528.1426991-1-nathan@kernel.org> References: <20220330234528.1426991-1-nathan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This flag is specific to clang, where it is only used by the 32-bit and 64-bit ARM backends. In certain situations, the presence of this flag will cause a warning, as shown by commit 6580c5c18fb3 ("um: clang: Strip out -mno-global-merge from USER_CFLAGS"). Since commit 61163efae020 ("kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang") that added this flag back in 2014, there have been quite a few changes to the GlobalMerge pass in LLVM. Building several different ARCH=arm and ARCH=arm64 configurations with LLVM 11 (minimum) and 15 (current main version) with this flag removed (i.e., with the default of '-mglobal-merge') reveals no modpost warnings, so it is likely that the issue noted in the comment is no longer relevant due to changes in LLVM or modpost, meaning this flag can be removed. If any new warnings show up that are a result of the removal of this flag, it can be added back under arch/arm{,64}/Makefile to avoid warnings on other architectures. Signed-off-by: Nathan Chancellor --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index daeb5c88b50b..f2723d9bfca4 100644 --- a/Makefile +++ b/Makefile @@ -784,10 +784,6 @@ ifdef CONFIG_CC_IS_CLANG KBUILD_CPPFLAGS += -Qunused-arguments # The kernel builds with '-std=gnu89' so use of GNU extensions is acceptable. KBUILD_CFLAGS += -Wno-gnu -# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the -# source of a reference will be _MergedGlobals and not on of the whitelisted names. -# See modpost pattern 2 -KBUILD_CFLAGS += -mno-global-merge else # gcc inanely warns about local variables called 'main' -- 2.35.1