From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C47C17A; Wed, 18 May 2022 14:07:36 +0000 (UTC) Received: by mail-oi1-f178.google.com with SMTP id e189so2739448oia.8; Wed, 18 May 2022 07:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:content-language:to :cc:references:from:subject:in-reply-to:content-transfer-encoding; bh=44Xgt+EUBiutauBulnIHgR1NZC7VLz+1d73CrLpoSuA=; b=EE+Ok5Q3AOQEWrEsMLQ8bJwxLj5JWKC0uRQavySm46LGHksaEXSJblszKsh1MvsIVQ sDPRJcb4u60eXiklTNwE2U+LD49Wb+WD9qcumnXXeQJnMUEh+Cprmc8yCFMWDDAx/laZ tSGFznxKpbQzHqnKFUn6Obmd3DZeEhLOmDwgdK5v2kgO5opVsh+5I61QnC6uyCbqRb+P h2C/Fnjhf4h05p6b5Q8AMg4jSgBqBTEFQHak8Fh8GP7YqlfCZ9bfj2PBgjyDMGe6fFi6 v1tCilE06OSMQ2Ap/40R6GV7SfyLOFpw0XtrB50yxlMyw4CFBhcTVnu1K1CJBROjIYsQ b0Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=44Xgt+EUBiutauBulnIHgR1NZC7VLz+1d73CrLpoSuA=; b=WzTuI+G51MiTpQ64MYRGG6Vw/AEfS+p6QiDiC22EhOazLVdLSq4ddUv4h0j6d/85kI oG7FXbscr6hT6IGRfvAlkmVrJtm4uHrLoo2wQ38MCvN6c1oCDUcCIkKZ1w3a5ZLrS0/y cclinVWM8zIOoMdOZQaN4LqKlOKDrqETiBfFLhHz0A8OoeDPYGFEZm+H/Sj8fppHhNsI mHlvrzNkcZuEs8YtUZcLcgG/2tjQDqvVTy1bw/AptgujfYhBdSlke80cbSxQ1Uu6MoMl MKOKt0eIs8/1zOdBkFrhZ10ktEmwseoh1LDCs1DMwt6bVNeQFP8/FQBJGHRK73yiIknz zZzw== X-Gm-Message-State: AOAM533WXOqt+bSNvnGs6/fyMksV68oEIUNkmQ8wP0f0g32P5yUx3nOC SOihJvxIwWlTvgobgNhaguI= X-Google-Smtp-Source: ABdhPJyXPBsJSPb3qsIt30kakP/1viqje/dN0om/JEDZ69uJP4Erfc4CCzg7BfUTauTabr0j1dC5fA== X-Received: by 2002:a05:6808:23d2:b0:326:979a:46f3 with SMTP id bq18-20020a05680823d200b00326979a46f3mr12917oib.207.1652882855862; Wed, 18 May 2022 07:07:35 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id v8-20020a056830140800b0060603221267sm782203otp.55.2022.05.18.07.07.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 May 2022 07:07:34 -0700 (PDT) Sender: Guenter Roeck Message-ID: <47c64195-6629-ba2b-4533-b0fe37518da0@roeck-us.net> Date: Wed, 18 May 2022 07:07:31 -0700 Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-US To: Arnd Bergmann Cc: Greg KH , Linux Kbuild mailing list , Arnd Bergmann , Linus Torvalds , Masahiro Yamada , clang-built-linux , Jonathan Corbet , Federico Vaga , Alex Shi , Hu Haowen , Michal Marek , Nick Desaulniers , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-doc-tw-discuss@lists.sourceforge.net, Linux ARM , Intel Graphics , dri-devel , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-btrfs References: <20220228103142.3301082-1-arnd@kernel.org> <20220516131023.GA2329080@roeck-us.net> <9510474d-5555-42b3-5a9c-90e3078df499@roeck-us.net> From: Guenter Roeck Subject: Re: [greybus-dev] Re: [PATCH] [v2] Kbuild: move to -std=gnu11 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/18/22 00:46, Arnd Bergmann wrote: > On Mon, May 16, 2022 at 3:19 PM Guenter Roeck wrote: >> On 5/16/22 06:31, Greg KH wrote: >>> On Mon, May 16, 2022 at 06:10:23AM -0700, Guenter Roeck wrote: >>>> On Mon, Feb 28, 2022 at 11:27:43AM +0100, Arnd Bergmann wrote: >>>>> From: Arnd Bergmann >>>>> >>>>> During a patch discussion, Linus brought up the option of changing >>>>> the C standard version from gnu89 to gnu99, which allows using variable >>>>> declaration inside of a for() loop. While the C99, C11 and later standards >>>>> introduce many other features, most of these are already available in >>>>> gnu89 as GNU extensions as well. >>>> >>>> The downside is that backporting affected patches to older kernel branches >>>> now fails with error messages such as >>>> >>>> mm/kfence/core.c: In function ‘kfence_init_pool’: >>>> mm/kfence/core.c:595:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode >>>> >>>> Just something to keep in mind when writing patches. >>> >>> I just ran across this very issue on this commit. It's an easy fixup >>> for 5.17.y to make this work, so I did that in my tree. If this gets to >>> be too much, we might need to reconsider adding c11 to older stable >>> kernels. >>> >> >> I think I'll do just that for ChromeOS; I don't want to have to deal >> with the backports, and we are using recent compilers anyway. > > I think it would be better not to have the --std=gnu11 change in the older > stable kernels by default, as this has introduced build warnings and other > smaller issues, as well as raising the minimum compiler version. > > The users that are stuck on older kernels for some reason tend to > overlap with those on older compilers. One example here is Android, > which used to ship with a gcc-4.9 build as the only non-clang toolchain, > and was using this for building their kernels. If someone wants to > pull in stable updates into an older Android, this would fail with > -std=gnu11. Others may be in the same situation. > > Changing some of the 5.x stable branches to -std=gnu11 is probably > less of a problem, but I would not know where to draw the line exactly. > Maybe check with the Android team to see what the newest kernel is > that they expect to be built with the old gcc-4.9. > I don't think they still build anything with gcc. We (ChromeOS) only need it for test builds of chromeos-4.4 (sigh), and that will hopefully be gone in a couple of months. We already enabled -std=gnu11 in chromeos-5.10 and chromeos-5.15. We'll see if that is possible with chromeos-5.4 as well. We won't bother with older kernel branches, but those should not get many patches from upstream outside stable release merges, so it is less of a problem. Guenter From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 62135C433FE for ; Wed, 18 May 2022 14:07:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CA3710EFED; Wed, 18 May 2022 14:07:38 +0000 (UTC) Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACB2F10ECCC; Wed, 18 May 2022 14:07:36 +0000 (UTC) Received: by mail-oi1-x233.google.com with SMTP id i66so2719161oia.11; Wed, 18 May 2022 07:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:content-language:to :cc:references:from:subject:in-reply-to:content-transfer-encoding; bh=44Xgt+EUBiutauBulnIHgR1NZC7VLz+1d73CrLpoSuA=; b=EE+Ok5Q3AOQEWrEsMLQ8bJwxLj5JWKC0uRQavySm46LGHksaEXSJblszKsh1MvsIVQ sDPRJcb4u60eXiklTNwE2U+LD49Wb+WD9qcumnXXeQJnMUEh+Cprmc8yCFMWDDAx/laZ tSGFznxKpbQzHqnKFUn6Obmd3DZeEhLOmDwgdK5v2kgO5opVsh+5I61QnC6uyCbqRb+P h2C/Fnjhf4h05p6b5Q8AMg4jSgBqBTEFQHak8Fh8GP7YqlfCZ9bfj2PBgjyDMGe6fFi6 v1tCilE06OSMQ2Ap/40R6GV7SfyLOFpw0XtrB50yxlMyw4CFBhcTVnu1K1CJBROjIYsQ b0Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=44Xgt+EUBiutauBulnIHgR1NZC7VLz+1d73CrLpoSuA=; b=vTk7JJNhINkNmpz9N8xDdjXPebGVQFxAaIApzrt3kQxyLljKAC9juM0iQa4XDgOnHz NtgQSY4pH77nbqKbKOdqLMMNb9V0GuT0xYDXgtjKnEnUJIXpUlgX1u+amODYYn2HtMsT MrIV6TuF8u2pVeTRgwYQ7WcMUqymoKfhuOUmnr65ymZOCu/UU93G3R2xVJLx1jKo0usU xDNDo/xtKqlbyyblez0zUvyZ4Ps7Ngcvxz1z9SIL8CrW7fUSAcW4CHokAPH1w6ipgFfV U5EAhBOayHPApx+DKOZJNekRxDfiCOcxBHTuKjjrwBAGO8MpHbMmWH3gLk4Xfu+s2zab AnLA== X-Gm-Message-State: AOAM530nF86GHWEAZe5P0+ss1Jy8s9XlyWuuBX9cprcQPJ8DfvxWgsd+ xwvfBdOBA6mTpsM8tWcMKRA= X-Google-Smtp-Source: ABdhPJyXPBsJSPb3qsIt30kakP/1viqje/dN0om/JEDZ69uJP4Erfc4CCzg7BfUTauTabr0j1dC5fA== X-Received: by 2002:a05:6808:23d2:b0:326:979a:46f3 with SMTP id bq18-20020a05680823d200b00326979a46f3mr12917oib.207.1652882855862; Wed, 18 May 2022 07:07:35 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id v8-20020a056830140800b0060603221267sm782203otp.55.2022.05.18.07.07.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 May 2022 07:07:34 -0700 (PDT) Message-ID: <47c64195-6629-ba2b-4533-b0fe37518da0@roeck-us.net> Date: Wed, 18 May 2022 07:07:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-US To: Arnd Bergmann References: <20220228103142.3301082-1-arnd@kernel.org> <20220516131023.GA2329080@roeck-us.net> <9510474d-5555-42b3-5a9c-90e3078df499@roeck-us.net> From: Guenter Roeck Subject: Re: [greybus-dev] Re: [PATCH] [v2] Kbuild: move to -std=gnu11 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonathan Corbet , Michal Marek , "open list:DOCUMENTATION" , Arnd Bergmann , Linux Kbuild mailing list , Greg KH , Masahiro Yamada , clang-built-linux , Nick Desaulniers , Linux Kernel Mailing List , dri-devel , linux-staging@lists.linux.dev, greybus-dev@lists.linaro.org, Linux ARM , Federico Vaga , Hu Haowen , Intel Graphics , linux-btrfs , Linus Torvalds , linux-doc-tw-discuss@lists.sourceforge.net, Alex Shi Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 5/18/22 00:46, Arnd Bergmann wrote: > On Mon, May 16, 2022 at 3:19 PM Guenter Roeck wrote: >> On 5/16/22 06:31, Greg KH wrote: >>> On Mon, May 16, 2022 at 06:10:23AM -0700, Guenter Roeck wrote: >>>> On Mon, Feb 28, 2022 at 11:27:43AM +0100, Arnd Bergmann wrote: >>>>> From: Arnd Bergmann >>>>> >>>>> During a patch discussion, Linus brought up the option of changing >>>>> the C standard version from gnu89 to gnu99, which allows using variable >>>>> declaration inside of a for() loop. While the C99, C11 and later standards >>>>> introduce many other features, most of these are already available in >>>>> gnu89 as GNU extensions as well. >>>> >>>> The downside is that backporting affected patches to older kernel branches >>>> now fails with error messages such as >>>> >>>> mm/kfence/core.c: In function ‘kfence_init_pool’: >>>> mm/kfence/core.c:595:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode >>>> >>>> Just something to keep in mind when writing patches. >>> >>> I just ran across this very issue on this commit. It's an easy fixup >>> for 5.17.y to make this work, so I did that in my tree. If this gets to >>> be too much, we might need to reconsider adding c11 to older stable >>> kernels. >>> >> >> I think I'll do just that for ChromeOS; I don't want to have to deal >> with the backports, and we are using recent compilers anyway. > > I think it would be better not to have the --std=gnu11 change in the older > stable kernels by default, as this has introduced build warnings and other > smaller issues, as well as raising the minimum compiler version. > > The users that are stuck on older kernels for some reason tend to > overlap with those on older compilers. One example here is Android, > which used to ship with a gcc-4.9 build as the only non-clang toolchain, > and was using this for building their kernels. If someone wants to > pull in stable updates into an older Android, this would fail with > -std=gnu11. Others may be in the same situation. > > Changing some of the 5.x stable branches to -std=gnu11 is probably > less of a problem, but I would not know where to draw the line exactly. > Maybe check with the Android team to see what the newest kernel is > that they expect to be built with the old gcc-4.9. > I don't think they still build anything with gcc. We (ChromeOS) only need it for test builds of chromeos-4.4 (sigh), and that will hopefully be gone in a couple of months. We already enabled -std=gnu11 in chromeos-5.10 and chromeos-5.15. We'll see if that is possible with chromeos-5.4 as well. We won't bother with older kernel branches, but those should not get many patches from upstream outside stable release merges, so it is less of a problem. Guenter From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0F2DC433F5 for ; Wed, 18 May 2022 14:07:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EA90310ECCC; Wed, 18 May 2022 14:07:37 +0000 (UTC) Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACB2F10ECCC; Wed, 18 May 2022 14:07:36 +0000 (UTC) Received: by mail-oi1-x233.google.com with SMTP id i66so2719161oia.11; Wed, 18 May 2022 07:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:content-language:to :cc:references:from:subject:in-reply-to:content-transfer-encoding; bh=44Xgt+EUBiutauBulnIHgR1NZC7VLz+1d73CrLpoSuA=; b=EE+Ok5Q3AOQEWrEsMLQ8bJwxLj5JWKC0uRQavySm46LGHksaEXSJblszKsh1MvsIVQ sDPRJcb4u60eXiklTNwE2U+LD49Wb+WD9qcumnXXeQJnMUEh+Cprmc8yCFMWDDAx/laZ tSGFznxKpbQzHqnKFUn6Obmd3DZeEhLOmDwgdK5v2kgO5opVsh+5I61QnC6uyCbqRb+P h2C/Fnjhf4h05p6b5Q8AMg4jSgBqBTEFQHak8Fh8GP7YqlfCZ9bfj2PBgjyDMGe6fFi6 v1tCilE06OSMQ2Ap/40R6GV7SfyLOFpw0XtrB50yxlMyw4CFBhcTVnu1K1CJBROjIYsQ b0Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=44Xgt+EUBiutauBulnIHgR1NZC7VLz+1d73CrLpoSuA=; b=vTk7JJNhINkNmpz9N8xDdjXPebGVQFxAaIApzrt3kQxyLljKAC9juM0iQa4XDgOnHz NtgQSY4pH77nbqKbKOdqLMMNb9V0GuT0xYDXgtjKnEnUJIXpUlgX1u+amODYYn2HtMsT MrIV6TuF8u2pVeTRgwYQ7WcMUqymoKfhuOUmnr65ymZOCu/UU93G3R2xVJLx1jKo0usU xDNDo/xtKqlbyyblez0zUvyZ4Ps7Ngcvxz1z9SIL8CrW7fUSAcW4CHokAPH1w6ipgFfV U5EAhBOayHPApx+DKOZJNekRxDfiCOcxBHTuKjjrwBAGO8MpHbMmWH3gLk4Xfu+s2zab AnLA== X-Gm-Message-State: AOAM530nF86GHWEAZe5P0+ss1Jy8s9XlyWuuBX9cprcQPJ8DfvxWgsd+ xwvfBdOBA6mTpsM8tWcMKRA= X-Google-Smtp-Source: ABdhPJyXPBsJSPb3qsIt30kakP/1viqje/dN0om/JEDZ69uJP4Erfc4CCzg7BfUTauTabr0j1dC5fA== X-Received: by 2002:a05:6808:23d2:b0:326:979a:46f3 with SMTP id bq18-20020a05680823d200b00326979a46f3mr12917oib.207.1652882855862; Wed, 18 May 2022 07:07:35 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id v8-20020a056830140800b0060603221267sm782203otp.55.2022.05.18.07.07.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 May 2022 07:07:34 -0700 (PDT) Message-ID: <47c64195-6629-ba2b-4533-b0fe37518da0@roeck-us.net> Date: Wed, 18 May 2022 07:07:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-US To: Arnd Bergmann References: <20220228103142.3301082-1-arnd@kernel.org> <20220516131023.GA2329080@roeck-us.net> <9510474d-5555-42b3-5a9c-90e3078df499@roeck-us.net> From: Guenter Roeck In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Intel-gfx] [greybus-dev] Re: [PATCH] [v2] Kbuild: move to -std=gnu11 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonathan Corbet , Michal Marek , "open list:DOCUMENTATION" , Arnd Bergmann , Linux Kbuild mailing list , Greg KH , Masahiro Yamada , clang-built-linux , Nick Desaulniers , Linux Kernel Mailing List , dri-devel , linux-staging@lists.linux.dev, greybus-dev@lists.linaro.org, Linux ARM , Federico Vaga , Hu Haowen , Intel Graphics , linux-btrfs , Linus Torvalds , linux-doc-tw-discuss@lists.sourceforge.net, Alex Shi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 5/18/22 00:46, Arnd Bergmann wrote: > On Mon, May 16, 2022 at 3:19 PM Guenter Roeck wrote: >> On 5/16/22 06:31, Greg KH wrote: >>> On Mon, May 16, 2022 at 06:10:23AM -0700, Guenter Roeck wrote: >>>> On Mon, Feb 28, 2022 at 11:27:43AM +0100, Arnd Bergmann wrote: >>>>> From: Arnd Bergmann >>>>> >>>>> During a patch discussion, Linus brought up the option of changing >>>>> the C standard version from gnu89 to gnu99, which allows using variable >>>>> declaration inside of a for() loop. While the C99, C11 and later standards >>>>> introduce many other features, most of these are already available in >>>>> gnu89 as GNU extensions as well. >>>> >>>> The downside is that backporting affected patches to older kernel branches >>>> now fails with error messages such as >>>> >>>> mm/kfence/core.c: In function ‘kfence_init_pool’: >>>> mm/kfence/core.c:595:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode >>>> >>>> Just something to keep in mind when writing patches. >>> >>> I just ran across this very issue on this commit. It's an easy fixup >>> for 5.17.y to make this work, so I did that in my tree. If this gets to >>> be too much, we might need to reconsider adding c11 to older stable >>> kernels. >>> >> >> I think I'll do just that for ChromeOS; I don't want to have to deal >> with the backports, and we are using recent compilers anyway. > > I think it would be better not to have the --std=gnu11 change in the older > stable kernels by default, as this has introduced build warnings and other > smaller issues, as well as raising the minimum compiler version. > > The users that are stuck on older kernels for some reason tend to > overlap with those on older compilers. One example here is Android, > which used to ship with a gcc-4.9 build as the only non-clang toolchain, > and was using this for building their kernels. If someone wants to > pull in stable updates into an older Android, this would fail with > -std=gnu11. Others may be in the same situation. > > Changing some of the 5.x stable branches to -std=gnu11 is probably > less of a problem, but I would not know where to draw the line exactly. > Maybe check with the Android team to see what the newest kernel is > that they expect to be built with the old gcc-4.9. > I don't think they still build anything with gcc. We (ChromeOS) only need it for test builds of chromeos-4.4 (sigh), and that will hopefully be gone in a couple of months. We already enabled -std=gnu11 in chromeos-5.10 and chromeos-5.15. We'll see if that is possible with chromeos-5.4 as well. We won't bother with older kernel branches, but those should not get many patches from upstream outside stable release merges, so it is less of a problem. Guenter From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69096C433F5 for ; Wed, 18 May 2022 14:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:Subject:From:References:Cc:To: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oEi2pfQOJsQQ+WCD7s9jlyUSAFMXkpMV7Lm2yGJGsk8=; b=VUgpFr++tYkjU+ jp/s5yA5Db0DzTfp5MOHsiiPlcIpgbAtEsUIX0v3lH4FQ7AjL0FIL84te7gz+Q7S/zKXYVl6a/uJ2 tjlyQ/MMU9GZe427Fq0H5dUPnUJCl5AutfUtJ56l2h5XbTFk1FxWZQBGcB5Q483L26wqEd5K7/d8o NVqSYBD91hBvIRAw1FFodxYwiXLvpW5alp6YCS+z2VIyqBDT8W9hHcbJenqQ3n+s6NkUMa5dDSeD6 AlCX4zdzjVAimB6pwtbRssqaG/nSARnLBG0RbQWw1+2U7XX+yY1MaEkAn+yBfsnIH8FviXwPMKRAU yGBt6ztgkf0732rC7qQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrKLF-002Rah-Ci; Wed, 18 May 2022 14:07:57 +0000 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrKKx-002RTe-Cq for linux-arm-kernel@lists.infradead.org; Wed, 18 May 2022 14:07:41 +0000 Received: by mail-oi1-x22d.google.com with SMTP id q8so2710578oif.13 for ; Wed, 18 May 2022 07:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:content-language:to :cc:references:from:subject:in-reply-to:content-transfer-encoding; bh=44Xgt+EUBiutauBulnIHgR1NZC7VLz+1d73CrLpoSuA=; b=EE+Ok5Q3AOQEWrEsMLQ8bJwxLj5JWKC0uRQavySm46LGHksaEXSJblszKsh1MvsIVQ sDPRJcb4u60eXiklTNwE2U+LD49Wb+WD9qcumnXXeQJnMUEh+Cprmc8yCFMWDDAx/laZ tSGFznxKpbQzHqnKFUn6Obmd3DZeEhLOmDwgdK5v2kgO5opVsh+5I61QnC6uyCbqRb+P h2C/Fnjhf4h05p6b5Q8AMg4jSgBqBTEFQHak8Fh8GP7YqlfCZ9bfj2PBgjyDMGe6fFi6 v1tCilE06OSMQ2Ap/40R6GV7SfyLOFpw0XtrB50yxlMyw4CFBhcTVnu1K1CJBROjIYsQ b0Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=44Xgt+EUBiutauBulnIHgR1NZC7VLz+1d73CrLpoSuA=; b=xJGKkPV7ZmweR1/5KR3yraI6kqkZpBbw6OMknDsgOMw25Ko3zK0d6PoLEGXJBUE1WE WJRIczxi50/gsCMvnjNM5rS2gMs0WF7zauld7YQXKtvSdmNayqGA5Ck09hoDyB+OY0gy tKLdV0NT9UwE3fHkeur+HAk7K9OuyzEoOTCF1HdAUKRxCwkMAe5gtfgH74oKJVwMgMXR MDwd0E+fy6h9Fea3WCbTR698eCIBohlUn5LmlXUasw2Dy/7O9oSPBjOaOXZ5LZuWiSQU MdMBlaP37CXqbiHCYdgI81BfrcL/Q5PrV5G/37wU+QYXSS7IlH6s+CagGCCJIy8t8gzo qxrQ== X-Gm-Message-State: AOAM5337KHztz3wtCF9+VMAuwRmAf3+3x3mOWA9+Qcqf9gq2VBiGhh9l i7xUKGy6YYabAzTCh3vf3yQ= X-Google-Smtp-Source: ABdhPJyXPBsJSPb3qsIt30kakP/1viqje/dN0om/JEDZ69uJP4Erfc4CCzg7BfUTauTabr0j1dC5fA== X-Received: by 2002:a05:6808:23d2:b0:326:979a:46f3 with SMTP id bq18-20020a05680823d200b00326979a46f3mr12917oib.207.1652882855862; Wed, 18 May 2022 07:07:35 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id v8-20020a056830140800b0060603221267sm782203otp.55.2022.05.18.07.07.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 May 2022 07:07:34 -0700 (PDT) Message-ID: <47c64195-6629-ba2b-4533-b0fe37518da0@roeck-us.net> Date: Wed, 18 May 2022 07:07:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-US To: Arnd Bergmann Cc: Greg KH , Linux Kbuild mailing list , Arnd Bergmann , Linus Torvalds , Masahiro Yamada , clang-built-linux , Jonathan Corbet , Federico Vaga , Alex Shi , Hu Haowen , Michal Marek , Nick Desaulniers , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-doc-tw-discuss@lists.sourceforge.net, Linux ARM , Intel Graphics , dri-devel , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-btrfs References: <20220228103142.3301082-1-arnd@kernel.org> <20220516131023.GA2329080@roeck-us.net> <9510474d-5555-42b3-5a9c-90e3078df499@roeck-us.net> From: Guenter Roeck Subject: Re: [greybus-dev] Re: [PATCH] [v2] Kbuild: move to -std=gnu11 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220518_070739_491457_8243D584 X-CRM114-Status: GOOD ( 30.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gNS8xOC8yMiAwMDo0NiwgQXJuZCBCZXJnbWFubiB3cm90ZToKPiBPbiBNb24sIE1heSAxNiwg MjAyMiBhdCAzOjE5IFBNIEd1ZW50ZXIgUm9lY2s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