diff --git a/recipes/hostpython/patches/fix-bug-17547.patch b/recipes/hostpython/patches/fix-bug-17547.patch new file mode 100644 index 0000000000..9277e2d186 --- /dev/null +++ b/recipes/hostpython/patches/fix-bug-17547.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -5731,7 +5731,7 @@ then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5 + $as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; } + save_CFLAGS=$CFLAGS +- CFLAGS="$CFLAGS -Werror" ++ CFLAGS="$CFLAGS -Werror -Wformat" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +--- a/configure.in ++++ b/configure.in +@@ -1185,7 +1185,7 @@ if test "$GCC" = "yes" + then + AC_MSG_CHECKING(whether gcc supports ParseTuple __format__) + save_CFLAGS=$CFLAGS +- CFLAGS="$CFLAGS -Werror" ++ CFLAGS="$CFLAGS -Werror -Wformat" + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]]) + ],[ diff --git a/recipes/hostpython/recipe.sh b/recipes/hostpython/recipe.sh index 5d7321e802..bb58affab4 100644 --- a/recipes/hostpython/recipe.sh +++ b/recipes/hostpython/recipe.sh @@ -10,6 +10,18 @@ RECIPE_hostpython=$RECIPES_PATH/hostpython function prebuild_hostpython() { cd $BUILD_hostpython + + # check marker in our source build + if [ -f .patched ]; then + # no patch needed + return + fi + + try patch -p1 < $RECIPE_hostpython/patches/fix-bug-17547.patch + + # everything done, touch the marker ! + touch .patched + try cp $RECIPE_hostpython/Setup Modules/Setup } @@ -25,7 +37,8 @@ function build_hostpython() { cd $BUILD_hostpython try ./configure - try make -j5 + try make -j5 -k + try make try mv Parser/pgen hostpgen if [ -f python.exe ]; then diff --git a/recipes/python/patches/fix-bug-17547.patch b/recipes/python/patches/fix-bug-17547.patch new file mode 100644 index 0000000000..9277e2d186 --- /dev/null +++ b/recipes/python/patches/fix-bug-17547.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -5731,7 +5731,7 @@ then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5 + $as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; } + save_CFLAGS=$CFLAGS +- CFLAGS="$CFLAGS -Werror" ++ CFLAGS="$CFLAGS -Werror -Wformat" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +--- a/configure.in ++++ b/configure.in +@@ -1185,7 +1185,7 @@ if test "$GCC" = "yes" + then + AC_MSG_CHECKING(whether gcc supports ParseTuple __format__) + save_CFLAGS=$CFLAGS +- CFLAGS="$CFLAGS -Werror" ++ CFLAGS="$CFLAGS -Werror -Wformat" + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]]) + ],[ diff --git a/recipes/python/recipe.sh b/recipes/python/recipe.sh index 4516e9fb63..c91b73d1e6 100644 --- a/recipes/python/recipe.sh +++ b/recipes/python/recipe.sh @@ -33,6 +33,7 @@ function prebuild_python() { try patch -p1 < $RECIPE_python/patches/fix-dynamic-lookup.patch try patch -p1 < $RECIPE_python/patches/fix-dlfcn.patch try patch -p1 < $RECIPE_python/patches/ctypes-find-library.patch + try patch -p1 < $RECIPE_python/patches/fix-bug-17547.patch system=$(uname -s) if [ "X$system" == "XDarwin" ]; then