From 1678d089c9f433663f040ba489c3ddc4481654a4 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 24 Jan 2018 20:07:47 +0000 Subject: [PATCH] aportgen linux: Also remove -Werror in Kbuild files (#1139) We discovered that one kernel had it in a Kbuild file in #1124. --- pmb/aportgen/linux.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pmb/aportgen/linux.py b/pmb/aportgen/linux.py index 4b161aa8..fc118596 100644 --- a/pmb/aportgen/linux.py +++ b/pmb/aportgen/linux.py @@ -101,10 +101,13 @@ def generate_apkbuild(args, pkgname, deviceinfo): cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \\ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \\ - xargs -0 sed -i 's/-Werror//g' + local i + local makefiles="$(find . -type f -name Makefile) + $(find . -type f -name Kbuild)" + for i in $makefiles; do + sed -i 's/-Werror-/-W/g' "$i" + sed -i 's/-Werror//g' "$i" + done # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) cp "$srcdir"/$_config "$builddir"/.config