summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-10-14 00:48:13 -0400
committerMike Frysinger <vapier@gentoo.org>2015-10-14 00:48:42 -0400
commitd3f5509e59f54cf3f9b27886aa508ba3e2c6e0b0 (patch)
tree14b0cb13dc161c2f5c7e03f88a70e3e045cb0ea0
parentx11-libs/gdk-pixbuf: Stable for HPPA PPC64 (bug #562878). (diff)
downloadgentoo-d3f5509e59f54cf3f9b27886aa508ba3e2c6e0b0.tar.gz
gentoo-d3f5509e59f54cf3f9b27886aa508ba3e2c6e0b0.tar.bz2
gentoo-d3f5509e59f54cf3f9b27886aa508ba3e2c6e0b0.zip
dev-lang/python: fix cross-compiling checks w/-Wformat
-rw-r--r--dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch24
-rw-r--r--dev-lang/python/python-2.7.10-r2.ebuild1
2 files changed, 25 insertions, 0 deletions
diff --git a/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch b/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch
new file mode 100644
index 00000000000..38433de925e
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch
@@ -0,0 +1,24 @@
+https://bugs.python.org/issue25397
+
+improve the cross-compile tests to be more focused
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1339,7 +1339,7 @@ if test "$GCC" = "yes"
+ then
+ AC_MSG_CHECKING(whether gcc supports ParseTuple __format__)
+ save_CFLAGS=$CFLAGS
+- CFLAGS="$CFLAGS -Werror -Wformat"
++ CFLAGS="$CFLAGS -Werror=format"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]])
+ ],[
+@@ -4458,7 +4458,7 @@ then
+ [ac_cv_have_long_long_format="cross -- assuming no"
+ if test x$GCC = xyes; then
+ save_CFLAGS=$CFLAGS
+- CFLAGS="$CFLAGS -Werror -Wformat"
++ CFLAGS="$CFLAGS -Werror=format"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdio.h>
+ #include <stddef.h>
diff --git a/dev-lang/python/python-2.7.10-r2.ebuild b/dev-lang/python/python-2.7.10-r2.ebuild
index a516f70c339..1b5a219a296 100644
--- a/dev-lang/python/python-2.7.10-r2.ebuild
+++ b/dev-lang/python/python-2.7.10-r2.ebuild
@@ -100,6 +100,7 @@ src_prepare() {
# Fix for cross-compiling.
epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
+ epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
Lib/distutils/command/install.py \