summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-02-05 09:45:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-07 17:29:59 +0000
commit3adb8d5cde5de8e536a7893782158f5ded10434c (patch)
treefd83987ec7e8004314f23a4ed2a42a4ce25d2ea4 /meta/recipes-devtools/python
parent1df1ac9f3f79f9c771386cf354ec12a23510eac3 (diff)
downloadpoky-3adb8d5cde5de8e536a7893782158f5ded10434c.tar.gz
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. (From OE-Core rev: 1e43b836106ed13cde294e2c565eaea6fe5efca7) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r--meta/recipes-devtools/python/python3/04-default-is-optimized.patch59
-rw-r--r--meta/recipes-devtools/python/python3_3.5.1.bb1
2 files changed, 0 insertions, 60 deletions
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 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3# when compiling for an embedded system, we need every bit of
4# performance we can get. default to optimized with the option
5# of opt-out.
6# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
7
8
92012/05/01
10Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
11
12Rebased for 3.4.2 02/2015
13Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
14
15Index: Python-3.5.0/Modules/main.c
16===================================================================
17--- Python-3.5.0.orig/Modules/main.c
18+++ Python-3.5.0/Modules/main.c
19@@ -37,7 +37,7 @@ static wchar_t **orig_argv;
20 static int orig_argc;
21
22 /* command line options */
23-#define BASE_OPTS L"bBc:dEhiIJm:OqRsStuvVW:xX:?"
24+#define BASE_OPTS L"bBc:dEhiIJm:NOqRsStuvVW:xX:?"
25
26 #define PROGRAM_OPTS BASE_OPTS
27
28@@ -63,6 +63,7 @@ static char *usage_2 = "\
29 -m mod : run library module as a script (terminates option list)\n\
30 -O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\
31 -OO : remove doc-strings in addition to the -O optimizations\n\
32+-N : do NOT optimize generated bytecode\n\
33 -q : don't print version and copyright messages on interactive startup\n\
34 -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
35 -S : don't imply 'import site' on initialization\n\
36@@ -419,8 +420,8 @@ Py_Main(int argc, wchar_t **argv)
37
38 /* case 'J': reserved for Jython */
39
40- case 'O':
41- Py_OptimizeFlag++;
42+ case 'N':
43+ Py_OptimizeFlag=0;
44 break;
45
46 case 'B':
47Index: Python-3.5.0/Python/pylifecycle.c
48===================================================================
49--- Python-3.5.0.orig/Python/pylifecycle.c
50+++ Python-3.5.0/Python/pylifecycle.c
51@@ -80,7 +80,7 @@ int Py_VerboseFlag; /* Needed by import.
52 int Py_QuietFlag; /* Needed by sysmodule.c */
53 int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
54 int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */
55-int Py_OptimizeFlag = 0; /* Needed by compile.c */
56+int Py_OptimizeFlag = 1; /* Needed by compile.c */
57 int Py_NoSiteFlag; /* Suppress 'import site' */
58 int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
59 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} \
22 22
23SRC_URI += "\ 23SRC_URI += "\
24 file://03-fix-tkinter-detection.patch \ 24 file://03-fix-tkinter-detection.patch \
25 file://04-default-is-optimized.patch \
26 file://avoid_warning_about_tkinter.patch \ 25 file://avoid_warning_about_tkinter.patch \
27 file://cgi_py.patch \ 26 file://cgi_py.patch \
28 file://host_include_contamination.patch \ 27 file://host_include_contamination.patch \