diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild index d47a251853228..60c3e719f0c01 100644 --- a/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild +++ b/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild @@ -419,7 +419,11 @@ src_prepare() { # Remove -Werror find . -type f \( -name Makefile -o -name "*.mk" \) \ - -exec sed -i "s/-Werror //g" {} + || die + -exec sed -i \ + -e 's/-Werror //g' \ + -e '/^CFLAGS *+= -Werror$/d' \ + -e 's/, "-Werror"//' \ + {} + || die default }