Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp4193539pxm; Tue, 1 Mar 2022 13:21:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJym44G/cmiDf31ZIsT1csZVefbmGMfQJspLOpGSe1/v+eQadQ/HkVi7OvLCz1XQkmytr5Qd X-Received: by 2002:a63:3fc3:0:b0:373:d98:51b0 with SMTP id m186-20020a633fc3000000b003730d9851b0mr23209325pga.356.1646169663467; Tue, 01 Mar 2022 13:21:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646169663; cv=none; d=google.com; s=arc-20160816; b=t8BeOH/GIhQm7tpB7sSLs/b6uVMqxMQbskYAFKrx04rUAmPjgPXtf+M75jL8y4RSgT CbcagaCwyA2Xvfc+nMExr5Cbsh0dSOhutvH23D5tTPy/26TD3sSVk6t+KCcCZsBwxTv3 ULcM680Bi+HpNg+dlsL0JCr7fpdG3ii5Mx0TMxKzOVcqnruttsdGL0QOPAal7Wb4IqAG UEQlyQrrCaGT5t32ZABAgl+XlKIB++TqXNKLint21tjssJOJozNwaaEDGB3JXYrielPI b9ecKDTqciFM76EbOvCRiV3U7ZHVbgleRchngFuoX0iASsY+75tFoygsPXdyCeSAgIWo PoUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xMi6jfjPmOmbZli1oBeEnCLh26RC8er1sFN7ImcKi+o=; b=pXk1MLuYbgX6JOoKBNSjAFsRIrPyj/k4RHnHpwiEdsCdg+Yz20ZUQRnu8iZlZH8gs4 lZBpggP6Q9/wxNGll/kFLSwRqnbzfwE5+I/XPiI0EhtbiKlPHj4k+qwoXjQBIaImaQiA rb9HlNwQvu9S2FcobVi20Sai2Ls+9c8pIovFgJ/CXQ41/1Swb6F/TK7a8wQJLOgjEtC6 3K19GAFFvjbpPe3Q7Jomb3ye8m/rGHFc2d6yQm9WEdhUgZjWqkzHEt8SEaBoCkg14K7a 64dMEWUeoP05IZxz3SNPnAyto/zFHGNZkieFzF17+3ahdUySW3y40QlCSuXWTB0IQ7AZ jOoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hquZMrM0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a17090aa58700b001b8a42457acsi3430526pjq.63.2022.03.01.13.20.42; Tue, 01 Mar 2022 13:21:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hquZMrM0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237602AbiCAT5d (ORCPT + 99 others); Tue, 1 Mar 2022 14:57:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237568AbiCAT5S (ORCPT ); Tue, 1 Mar 2022 14:57:18 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA5887460F for ; Tue, 1 Mar 2022 11:56:19 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id i11so28753479lfu.3 for ; Tue, 01 Mar 2022 11:56:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xMi6jfjPmOmbZli1oBeEnCLh26RC8er1sFN7ImcKi+o=; b=hquZMrM0xczMD9ZZ2fmNHpKRRvIiE7LGxeRQJjMZze98rNEK5Ra0HRlOcHxK1KVi4e FQBN2HtdkQyg3o4uLsn9EldD2THulu/j3z0J4c66DGvW7dy1eAyfhY+zPXLMelBK2NVs vFTKlgnUUtURZxAVCwYSSRSsE1DD1TOPa1gDQr3nPyXjuZyynXejfYtMrPNZv4qIlUpD asXGdBdEC/EqRmjLSKU9coJTyUmLsswdnWGR9v05EWG09syjtZNPsGSHcVR0+xDYzlUn xQ2tt273NyMVjhC6JJKYVK3HJjm31oXEOGz7C5tWg61kUtCoX5BnnE6UEYkhMFnA1EZr /tdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xMi6jfjPmOmbZli1oBeEnCLh26RC8er1sFN7ImcKi+o=; b=mSzNAaRGtQx3n1AHWsyP5HbcnnzYxKsJfUSXPx/jgeX9KTsjeCxCWwzth1VVyYOjHJ iK4pbYhOtRXvMuA976Nf2BaPU2cInmUDvEjU1J6qdvBB9KwRYXFQzxBSrB+yXBazchnP BedezbU06/7AHuqcqJUx8ekf0SYRQMCgTyerayG6TBi0qk1gFlidaIyPpDO7p2XXJpEj i3trbsiIHrIPJS6GE6rhdoW7c6zflelr9lcC5gG1ZU1jjwRfy5TMuYcdw1++NR5Ba1ZW TCNJI9HvxoP7Qoukojn/Q3b/m4FnBlcP/3ZKVjvrUUV8cbZDjRpwTIxOW6SBrzRy8+Ao De1Q== X-Gm-Message-State: AOAM532Ry4CJA3YuFX3W2ZfoCwmBCbgZZbRiviBHOn/srX+SRClLvXvY Tk9cESTxtz2PjI2tXU8FpdyhGqa1LxgQfMZTEausTA== X-Received: by 2002:a19:2d11:0:b0:445:65c7:5f1e with SMTP id k17-20020a192d11000000b0044565c75f1emr16420364lfj.184.1646164576477; Tue, 01 Mar 2022 11:56:16 -0800 (PST) MIME-Version: 1.0 References: <20220301145233.3689119-1-arnd@kernel.org> <20220301145233.3689119-3-arnd@kernel.org> In-Reply-To: <20220301145233.3689119-3-arnd@kernel.org> From: Nick Desaulniers Date: Tue, 1 Mar 2022 11:56:05 -0800 Message-ID: Subject: Re: [PATCH 3/3] Kbuild: use -std=gnu11 for KBUILD_USERCFLAGS To: Arnd Bergmann Cc: Masahiro Yamada , Arnd Bergmann , Linus Torvalds , Marco Elver , Jani Nikula , David Sterba , Alex Shi , Miguel Ojeda , Mark Rutland , linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-18.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 On Tue, Mar 1, 2022 at 6:52 AM Arnd Bergmann wrote: > > 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 Thanks for the patches! Reviewed-by: Nick Desaulniers > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 37ef6a555dcd..7c9be7f1ccd4 100644 > --- a/Makefile > +++ b/Makefile > @@ -432,7 +432,7 @@ HOSTCXX = g++ > endif > > export KBUILD_USERCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \ > - -O2 -fomit-frame-pointer -std=gnu89 \ > + -O2 -fomit-frame-pointer -std=gnu11 \ > -Wdeclaration-after-statement > export KBUILD_USERLDFLAGS := > > -- > 2.29.2 > -- Thanks, ~Nick Desaulniers