lkml.org 
[lkml]   [2018]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Build failures with gcc 4.5 and older
On Tue, 14 Aug 2018 10:09:04 -0700 Guenter Roeck <linux@roeck-us.net> wrote:

> Since commit c1a2f7f0c0645 ("mm: Allocate the mm_cpumask
> (mm->cpu_bitmap[]) dynamically based on nr_cpu_ids"), building
> the Linux kernel with gcc version 4.5 and older fails as follows.
>
> In file included from ./include/linux/mm.h:17:0,
> from ./include/linux/pid_namespace.h:7,
> from ./include/linux/ptrace.h:10,
> from arch/openrisc/kernel/asm-offsets.c:32:
> ./include/linux/mm_types.h:497:16: error: flexible array member in otherwise empty struct

Confused. Why does it think that the mm_struct is "otherwise empty"?

This shuts it up:

--- a/include/linux/mm_types.h~a
+++ a/include/linux/mm_types.h
@@ -490,6 +490,7 @@ struct mm_struct {
#endif
} __randomize_layout;

+ int wibble;
/*
* The mm_cpumask needs to be at the end of mm_struct, because it
* is dynamically sized based on nr_cpu_ids.

So we could add something like that, along with the appropriate #if
GCC_VERSION and a comment. A simple enough change, to keep those old
gcc versions limping along for a bit longer?

\
 
 \ /
  Last update: 2018-08-14 23:37    [W:0.108 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site