From 1e43b836106ed13cde294e2c565eaea6fe5efca7 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 5 Feb 2016 09:45:24 +0000 Subject: python3: remove optimize by default patch Python 3 resurrected the default to optimised patch, on the rationale that embedded systems want all the performance they can get. Unfortunately the only impact Python "optimisation" has is to remove all asserts which can be actively harmful, so remove this patch. Signed-off-by: Ross Burton --- .../python/python3/04-default-is-optimized.patch | 59 ---------------------- meta/recipes-devtools/python/python3_3.5.1.bb | 1 - 2 files changed, 60 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/04-default-is-optimized.patch diff --git a/meta/recipes-devtools/python/python3/04-default-is-optimized.patch b/meta/recipes-devtools/python/python3/04-default-is-optimized.patch deleted file mode 100644 index 4b8a7e56bc..0000000000 --- a/meta/recipes-devtools/python/python3/04-default-is-optimized.patch +++ /dev/null @@ -1,59 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -# when compiling for an embedded system, we need every bit of -# performance we can get. default to optimized with the option -# of opt-out. -# Signed-Off: Michael 'Mickey' Lauer - - -2012/05/01 -Signed-Off-By: Nitin A Kamble - -Rebased for 3.4.2 02/2015 -Signed-off-by: Alejandro Hernandez - -Index: Python-3.5.0/Modules/main.c -=================================================================== ---- Python-3.5.0.orig/Modules/main.c -+++ Python-3.5.0/Modules/main.c -@@ -37,7 +37,7 @@ static wchar_t **orig_argv; - static int orig_argc; - - /* command line options */ --#define BASE_OPTS L"bBc:dEhiIJm:OqRsStuvVW:xX:?" -+#define BASE_OPTS L"bBc:dEhiIJm:NOqRsStuvVW:xX:?" - - #define PROGRAM_OPTS BASE_OPTS - -@@ -63,6 +63,7 @@ static char *usage_2 = "\ - -m mod : run library module as a script (terminates option list)\n\ - -O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\ - -OO : remove doc-strings in addition to the -O optimizations\n\ -+-N : do NOT optimize generated bytecode\n\ - -q : don't print version and copyright messages on interactive startup\n\ - -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\ - -S : don't imply 'import site' on initialization\n\ -@@ -419,8 +420,8 @@ Py_Main(int argc, wchar_t **argv) - - /* case 'J': reserved for Jython */ - -- case 'O': -- Py_OptimizeFlag++; -+ case 'N': -+ Py_OptimizeFlag=0; - break; - - case 'B': -Index: Python-3.5.0/Python/pylifecycle.c -=================================================================== ---- Python-3.5.0.orig/Python/pylifecycle.c -+++ Python-3.5.0/Python/pylifecycle.c -@@ -80,7 +80,7 @@ int Py_VerboseFlag; /* Needed by import. - int Py_QuietFlag; /* Needed by sysmodule.c */ - int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */ - int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */ --int Py_OptimizeFlag = 0; /* Needed by compile.c */ -+int Py_OptimizeFlag = 1; /* Needed by compile.c */ - int Py_NoSiteFlag; /* Suppress 'import site' */ - int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */ - int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */ diff --git a/meta/recipes-devtools/python/python3_3.5.1.bb b/meta/recipes-devtools/python/python3_3.5.1.bb index 54007d3d38..11f959b161 100644 --- a/meta/recipes-devtools/python/python3_3.5.1.bb +++ b/meta/recipes-devtools/python/python3_3.5.1.bb @@ -22,7 +22,6 @@ ${DISTRO_SRC_URI} \ SRC_URI += "\ file://03-fix-tkinter-detection.patch \ - file://04-default-is-optimized.patch \ file://avoid_warning_about_tkinter.patch \ file://cgi_py.patch \ file://host_include_contamination.patch \ -- cgit 1.2.3-korg