Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3571701pxp; Tue, 8 Mar 2022 17:46:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpe0vDxJm3kcsmcE+nZBv8hAu4zCt1ZEHsBSBLPn5UWWrU4Iq7FHZxKtbxTwbQMmx+mG6P X-Received: by 2002:a17:902:7786:b0:14d:51c6:21a8 with SMTP id o6-20020a170902778600b0014d51c621a8mr20246965pll.75.1646790372829; Tue, 08 Mar 2022 17:46:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646790372; cv=none; d=google.com; s=arc-20160816; b=IK1/vmcG09ej0vMeoptwB4NaAPH387Xk8j30iEYKOA4lR1qCvQfk72wgWbU2fHUqrE mdBr9L0HXLQ9xQAf5D1MIbo5F38Ew+y3vWsg4PiyQLeLb4vSGnkmIdgVz665m1FNGDc8 ilWF/bgxVj2tr5FxnCL6AacgsuBaQmev+ZvWhQ7L234utJyJzNLpTtK7f+iv2fwAvBFZ l06W40OBVK3goj9K5T2gKGoO6+HFroJ9WmE+F9g4XbNWG52PR4Vpwj9qo/sboXPFwwIG s4ztjDX+NJedYADAPURIs2zmaAJgDmvJp1vZBXKEnJJoTBy7KQyJgLay3k9pFOdlYRLO Ao1Q== 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=ZFwWfJZ0VempA0ejX0otLkCSXbhKbXAXCO+ZoqILg7I=; b=Mn+obLfU9eFw3RNihglOOq9RzAqXKHe4JhTIwIhZlKUOd3nfI1gTGA1epsHmDfJH3O xyao+c+G3Yg74zW0945iQKvhoWPc/dqeUbPxRIUNfFXmC/y1gCPzrojYNz+IbYllRDuU T0hTd7EKuThCNtmXjvf9elLnkCADSY0L+Eyx2/qq/+OkUs8ox3pysw+ud20/ns1OLwNi H6Fu6PVem/CtsI0L35B4Sl+jMxWOhiblD7E7C48t60RphBTOGJQX6cyCuP2StCrq482W DPda7ieH+HPrM+QYvVToUWZekkOc5kVss2M9S87EC/QF2QrCgOfcXQTy6EwXrR5Xxh9P CEkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b7OJ9Rf2; 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 y16-20020a056a00191000b004f3a81dbcd1si510720pfi.124.2022.03.08.17.46.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 17:46:12 -0800 (PST) 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=b7OJ9Rf2; 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 8599E1CC7FA; Tue, 8 Mar 2022 16:24:08 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350474AbiCHV6L (ORCPT + 99 others); Tue, 8 Mar 2022 16:58:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350520AbiCHV6J (ORCPT ); Tue, 8 Mar 2022 16:58:09 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF89656C3B; Tue, 8 Mar 2022 13:57:11 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 79442B81DFE; Tue, 8 Mar 2022 21:57:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2B2AC340EC; Tue, 8 Mar 2022 21:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646776629; bh=eGD/su/n2B61nqlOmpuFpZhwnQeDphrdFbvHLaijoSc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b7OJ9Rf2Y+g8br7xVIjyOlcfvW8+SyMmqJCm6j/ZXEEyA4S+LY+3b8r4799BuOLYk TLWFQ5r2ZbzLJTRSMjAzXn/8CWEfEfz1etzwIxlED128hvB271uttJhrCazgihEbWI ZL1t0qMlBb2KK9yZ1W+SfHMT4ii+vS/0aMPrtuDh443A3/VIYXgiF7k4hXqJeKl8C9 NIjUTtcubyLdk09OagrHy1D+bABzL0S6Jg3Seoq8jjBHPgnXrOeqAzoMcl/uKsiSOv th/iWa4NXq8H+a/FDexq0GqMBOEUlcUVL//Cz2ehBBxRMMuabOH5nsxZdwJ6hBII3t FbwQteQSri0DA== From: Arnd Bergmann To: Masahiro Yamada Cc: alexs@kernel.org, arnd@arndb.de, arnd@kernel.org, dsterba@suse.com, elver@google.com, jani.nikula@intel.com, linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, mark.rutland@arm.com, ndesaulniers@google.com, ojeda@kernel.org, torvalds@linux-foundation.org Subject: [PATCH 4/4] Kbuild: use -std=gnu11 for KBUILD_USERCFLAGS Date: Tue, 8 Mar 2022 22:56:15 +0100 Message-Id: <20220308215615.14183-5-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220308215615.14183-1-arnd@kernel.org> References: <20220308215615.14183-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 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 From: Arnd Bergmann As we change the C language standard for the kernel from gnu89 to gnu11, it makes sense to also update the version for user space compilation. Some users have older native compilers than what they use for kernel builds, so I considered using gnu99 as the default version for wider compatibility with gcc-4.6 and earlier. However, testing with older compilers showed that we already require HOSTCC version 5.1 as well because a lot of host tools include linux/compiler.h that uses __has_attribute(): CC tools/objtool/exec-cmd.o In file included from tools/include/linux/compiler_types.h:36:0, from tools/include/linux/compiler.h:5, from exec-cmd.c:2: tools/include/linux/compiler-gcc.h:19:5: error: "__has_attribute" is not defined [-Werror=undef] Signed-off-by: Arnd Bergmann --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1ba8dc523952..e0b11ddd0760 100644 --- a/Makefile +++ b/Makefile @@ -432,7 +432,7 @@ HOSTCXX = g++ endif KBUILD_USERHOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \ - -O2 -fomit-frame-pointer -std=gnu89 \ + -O2 -fomit-frame-pointer -std=gnu11 \ -Wdeclaration-after-statement KBUILD_USERCFLAGS := $(KBUILD_USERHOSTCFLAGS) $(USERCFLAGS) KBUILD_USERLDFLAGS := $(USERLDFLAGS) -- 2.29.2