revert OE-core commit "python: remove the default optimization" (commit : 165ed464bbb...
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-devtools / python / python / 99-ignore-optimization-flag.patch
diff --git a/meta-openvuplus/recipes-devtools/python/python/99-ignore-optimization-flag.patch b/meta-openvuplus/recipes-devtools/python/python/99-ignore-optimization-flag.patch
new file mode 100644 (file)
index 0000000..a5d9812
--- /dev/null
@@ -0,0 +1,21 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+# Reinstate the empty -O option to fix weird mixing of native and target
+# binaries and libraries with LD_LIBRARY_PATH when host==target
+#
+# Signed-off-by: Denys Dmytriyenko <denis@denix.org>
+
+Index: Python-2.6.6/Modules/main.c
+===================================================================
+--- Python-2.6.6.orig/Modules/main.c
++++ Python-2.6.6/Modules/main.c
+@@ -327,6 +327,9 @@ Py_Main(int argc, char **argv)
+         /* case 'J': reserved for Jython */
++              case 'O': /* ignore it */
++                      break;
++
+         case 'N':
+             Py_OptimizeFlag=0;
+             break;