dev-lang/python: fix cross-compiling checks w/-Wformat

This commit is contained in:
Mike Frysinger
2015-10-14 00:48:13 -04:00
parent 8b48d4abf4
commit d3f5509e59
2 changed files with 25 additions and 0 deletions

View File

@@ -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>

View File

@@ -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 \