Re: powerpc build with Kernel v4.4

Pavel Machek


I'm trying to build the toshiba_defconfig [1] for the powerpc architecture using the CIP v4.4 Kernel but I'm hitting some problems. The log from the build can be seen on GitLab [2].

Has anyone tried building this configuration recently?

I'm using gcc compiler v8.1.0. I mention this because I've see a half-related discussion [3] when Googling. From this mail thread I wonder if there are some patches we need to backport?
Is there chance to use different gcc? Because this looks like gcc
bug... but workaround seems simple enough. Let me investigate some


commit 9d2e929c3bae4c30afd1b00fdbe6f7d477e13e8c
Author: Michael Ellerman <>
Date: Thu Feb 14 11:08:29 2019 +1100

powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

commit ca6d5149d2ad0a8d2f9c28cbe379802260a0a5e0 upstream.

GCC 8 warns about the logic in vr_get/set(), which with -Werror
the build:

In function ‘user_regset_copyin’,
inlined from ‘vr_set’ at
include/linux/regset.h:295:4: error: ‘memcpy’
offset [-527, -529] is
out of the bounds [0, 16] of object ‘vrsave’
with type ‘union
<anonymous>’ [-Werror=array-bounds]
arch/powerpc/kernel/ptrace.c: In function
arch/powerpc/kernel/ptrace.c:623:5: note:
‘vrsave’ declared here
} vrsave;

This has been identified as a regression in GCC, see GCC bug

However we can avoid the warning and also simplify the logic and
it more robust.

(cesky, pictures)

Join to automatically receive all group messages.