diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3/04-default-is-optimized.patch')
-rw-r--r-- | meta/recipes-devtools/python/python3/04-default-is-optimized.patch | 58 |
1 files changed, 58 insertions, 0 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 new file mode 100644 index 0000000000..d5afd40025 --- /dev/null +++ b/meta/recipes-devtools/python/python3/04-default-is-optimized.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | Updated original patch for python 2.7.3 | ||
4 | |||
5 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
6 | 2012/05/01 | ||
7 | |||
8 | |||
9 | # when compiling for an embedded system, we need every bit of | ||
10 | # performance we can get. default to optimized with the option | ||
11 | # of opt-out. | ||
12 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | ||
13 | |||
14 | Index: Python-3.2.3/Python/compile.c | ||
15 | =================================================================== | ||
16 | --- Python-3.2.3.orig/Python/compile.c 2012-04-10 23:54:08.000000000 -0700 | ||
17 | +++ Python-3.2.3/Python/compile.c 2012-09-19 15:58:46.649123998 -0700 | ||
18 | @@ -30,7 +30,7 @@ | ||
19 | #include "symtable.h" | ||
20 | #include "opcode.h" | ||
21 | |||
22 | -int Py_OptimizeFlag = 0; | ||
23 | +int Py_OptimizeFlag = 1; | ||
24 | |||
25 | #define DEFAULT_BLOCK_SIZE 16 | ||
26 | #define DEFAULT_BLOCKS 8 | ||
27 | Index: Python-3.2.3/Modules/main.c | ||
28 | =================================================================== | ||
29 | --- Python-3.2.3.orig/Modules/main.c 2012-04-10 23:54:07.000000000 -0700 | ||
30 | +++ Python-3.2.3/Modules/main.c 2012-09-19 16:00:32.153124053 -0700 | ||
31 | @@ -46,7 +46,7 @@ | ||
32 | static int orig_argc; | ||
33 | |||
34 | /* command line options */ | ||
35 | -#define BASE_OPTS L"bBc:dEhiJm:OqRsStuvVW:xX:?" | ||
36 | +#define BASE_OPTS L"bBc:dEhiJm:NOqRsStuvVW:xX:?" | ||
37 | |||
38 | #define PROGRAM_OPTS BASE_OPTS | ||
39 | |||
40 | @@ -71,6 +71,7 @@ | ||
41 | -m mod : run library module as a script (terminates option list)\n\ | ||
42 | -O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\ | ||
43 | -OO : remove doc-strings in addition to the -O optimizations\n\ | ||
44 | +-N : do NOT optimize generated bytecode\n\ | ||
45 | -q : don't print version and copyright messages on interactive startup\n\ | ||
46 | -R : use a pseudo-random salt to make hash() values of various types be\n\ | ||
47 | unpredictable between separate invocations of the interpreter, as\n\ | ||
48 | @@ -407,8 +408,8 @@ | ||
49 | |||
50 | /* case 'J': reserved for Jython */ | ||
51 | |||
52 | - case 'O': | ||
53 | - Py_OptimizeFlag++; | ||
54 | + case 'N': | ||
55 | + Py_OptimizeFlag=0; | ||
56 | break; | ||
57 | |||
58 | case 'B': | ||