All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jari Ruusu <jariruusu@protonmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH 5.10 00/59] 5.10.223-rc1 review
Date: Fri, 26 Jul 2024 09:49:49 +0200	[thread overview]
Message-ID: <2024072633-easel-erasure-18fa@gregkh> (raw)
In-Reply-To: <veJcp8NcM5qwkB_p0qsjQCFvZR5U4SqezKKMnUgM-khGFC4sCcvkodk-beWQ2a4qd3IxUYaLdGp9_GBwf3FLvkoU8f1MXjSk3gCsQOKnXZw=@protonmail.com>

On Fri, Jul 26, 2024 at 07:25:21AM +0000, Jari Ruusu wrote:
> Some older systems still compile kernels with old gcc version.
> 
> $ grep -B3 "^GNU C" linux-5.10.223-rc1/Documentation/Changes 
> ====================== ===============  ========================================
>         Program        Minimal version       Command to check the version
> ====================== ===============  ========================================
> GNU C                  4.9              gcc --version
> 
> These warnings and errors show up when compiling with gcc 4.9.2
> 
>   UPD     include/config/kernel.release
>   UPD     include/generated/uapi/linux/version.h
>   UPD     include/generated/utsrelease.h
>   CC      scripts/mod/empty.o
> In file included from ././include/linux/compiler_types.h:65:0,
>                  from <command-line>:0:
> ./include/linux/compiler_attributes.h:29:29: warning: "__GCC4_has_attribute___uninitialized__" is not defined [-Wundef]
>  # define __has_attribute(x) __GCC4_has_attribute_##x
>                              ^
> ./include/linux/compiler_attributes.h:278:5: note: in expansion of macro '__has_attribute'
>  #if __has_attribute(__uninitialized__)
>      ^
> [SNIP]
>   AR      arch/x86/events/built-in.a
>   CC      arch/x86/kvm/../../../virt/kvm/kvm_main.o
> In file included from ././include/linux/compiler_types.h:65:0,
>                  from <command-line>:0:
> ./include/linux/compiler_attributes.h:29:29: error: "__GCC4_has_attribute___uninitialized__" is not defined [-Werror=undef]
>  # define __has_attribute(x) __GCC4_has_attribute_##x
>                              ^
> ./include/linux/compiler_attributes.h:278:5: note: in expansion of macro '__has_attribute'
>  #if __has_attribute(__uninitialized__)
>      ^
> cc1: all warnings being treated as errors
> make[2]: *** [scripts/Makefile.build:286: arch/x86/kvm/../../../virt/kvm/kvm_main.o] Error 1
> make[1]: *** [scripts/Makefile.build:503: arch/x86/kvm] Error 2
> make: *** [Makefile:1832: arch/x86] Error 2
> 
> Following patch fixes this. Upstream won't need this because
> newer kernels are not compilable with gcc 4.9
> 
> --- ./include/linux/compiler_attributes.h.OLD
> +++ ./include/linux/compiler_attributes.h
> @@ -37,6 +37,7 @@
>  # define __GCC4_has_attribute___nonstring__           0
>  # define __GCC4_has_attribute___no_sanitize_address__ (__GNUC_MINOR__ >= 8)
>  # define __GCC4_has_attribute___no_sanitize_undefined__ (__GNUC_MINOR__ >= 9)
> +# define __GCC4_has_attribute___uninitialized__       0
>  # define __GCC4_has_attribute___fallthrough__         0
>  # define __GCC4_has_attribute___warning__             1
>  #endif
> 
> Fixes: upstream fd7eea27a3ae "Compiler Attributes: Add __uninitialized macro"
> Signed-off-by: Jari Ruusu <jariruusu@protonmail.com>

Please submit this in a format in which we can apply it, thanks!

greg k-h

  reply	other threads:[~2024-07-26  7:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-26  7:25 [PATCH 5.10 00/59] 5.10.223-rc1 review Jari Ruusu
2024-07-26  7:49 ` Greg Kroah-Hartman [this message]
2024-07-26  8:21   ` Jari Ruusu
2024-07-26  8:52     ` Greg Kroah-Hartman
2024-07-26  9:53       ` Jari Ruusu
2024-07-26 10:23         ` Greg Kroah-Hartman
2024-08-13 10:32           ` Greg Kroah-Hartman
2024-07-26 10:00       ` Shreeya Patel
  -- strict thread matches above, loose matches on Subject: below --
2024-07-25 14:36 Greg Kroah-Hartman
2024-07-25 17:36 ` ChromeOS Kernel Stable Merge
2024-07-26  4:19 ` Dominique Martinet
2024-07-26  8:10 ` Pavel Machek
2024-07-26 11:35 ` Mark Brown
2024-07-26 17:12 ` Jon Hunter
2024-07-26 17:27 ` Florian Fainelli
2024-07-26 17:33 ` Naresh Kamboju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024072633-easel-erasure-18fa@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=jariruusu@protonmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.