diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-12-12 08:32:52 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-12-12 08:33:16 +0000 |
commit | b75adffb42822e75a6e3e4c5b7ad02258134b221 (patch) | |
tree | 0a493e26f9b9bb56aaa1041ccc68b5be35df5cbc /app-emulation | |
parent | dev-python/tree-sitter: fix DISTUTILS_USE_SETUPTOOLS setting (diff) | |
download | gentoo-b75adffb42822e75a6e3e4c5b7ad02258134b221.tar.gz gentoo-b75adffb42822e75a6e3e4c5b7ad02258134b221.tar.bz2 gentoo-b75adffb42822e75a6e3e4c5b7ad02258134b221.zip |
app-emulation/qemu: make ./configure -Werror-clean
Fix safe-stack detection on gcc -Wall -Wextra to
avoid declaration of unused parameters.
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/qemu/files/qemu-5.2.0-cleaner-werror.patch | 40 | ||||
-rw-r--r-- | app-emulation/qemu/qemu-5.2.0.ebuild | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/app-emulation/qemu/files/qemu-5.2.0-cleaner-werror.patch b/app-emulation/qemu/files/qemu-5.2.0-cleaner-werror.patch new file mode 100644 index 000000000000..33115f1df480 --- /dev/null +++ b/app-emulation/qemu/files/qemu-5.2.0-cleaner-werror.patch @@ -0,0 +1,40 @@ +-Wall -Wextra compains about unused arguments, +causes safe-stack to be mis-detected. +--- a/configure ++++ b/configure +@@ -2293,7 +2293,7 @@ fi + cat > $TMPC << EOF + #include <stdint.h> + #include <stdio.h> +-int main(int argc, char *argv[]) { ++int main(void) { + return printf("%zu", SIZE_MAX); + } + EOF +@@ -4911,7 +4911,7 @@ fi + + if test "$safe_stack" = "yes"; then + cat > $TMPC << EOF +-int main(int argc, char *argv[]) ++int main(void) + { + #if ! __has_feature(safe_stack) + #error SafeStack Disabled +@@ -4933,7 +4933,7 @@ EOF + fi + else + cat > $TMPC << EOF +-int main(int argc, char *argv[]) ++int main(void) + { + #if defined(__has_feature) + #if __has_feature(safe_stack) +@@ -5283,7 +5283,7 @@ static const int Z = 1; + #define TAUT(X) ((X) == Z) + #define PAREN(X, Y) (X == Y) + #define ID(X) (X) +-int main(int argc, char *argv[]) ++int main(void) + { + int x = 0, y = 0; + x = ID(x); diff --git a/app-emulation/qemu/qemu-5.2.0.ebuild b/app-emulation/qemu/qemu-5.2.0.ebuild index 154a8d685191..ebb2803247ec 100644 --- a/app-emulation/qemu/qemu-5.2.0.ebuild +++ b/app-emulation/qemu/qemu-5.2.0.ebuild @@ -223,6 +223,7 @@ RDEPEND="${CDEPEND} PATCHES=( "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch + "${FILESDIR}"/${PN}-5.2.0-cleaner-werror.patch ) QA_PREBUILT=" |