All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] python3: remove optimize by default patch
@ 2016-02-05 11:47 Ross Burton
  2016-02-05 11:47 ` [PATCH 2/3] libpcre: enable unicode properties by default Ross Burton
  2016-02-05 11:47 ` [PATCH 3/3] glib-2.0: use the system libpcre Ross Burton
  0 siblings, 2 replies; 5+ messages in thread
From: Ross Burton @ 2016-02-05 11:47 UTC (permalink / raw)
  To: openembedded-core

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 <ross.burton@intel.com>
---
 .../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 4b8a7e5..0000000
--- 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 <mickey@vanille-media.de>
-
-
-2012/05/01
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-Rebased for 3.4.2 02/2015
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-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 54007d3..11f959b 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 \
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] libpcre: enable unicode properties by default
  2016-02-05 11:47 [PATCH 1/3] python3: remove optimize by default patch Ross Burton
@ 2016-02-05 11:47 ` Ross Burton
  2016-02-05 11:47 ` [PATCH 3/3] glib-2.0: use the system libpcre Ross Burton
  1 sibling, 0 replies; 5+ messages in thread
From: Ross Burton @ 2016-02-05 11:47 UTC (permalink / raw)
  To: openembedded-core

Enable Unicode properties by default, as they're useful and for example GLib
needs them.  As there is an impact to code size add this as a PACKAGECONFIG so
tightly constrained environments can save space by potentially disabling them.

Also change --enable-utf8 to --enable-utf, as the former is a compatibility
option for the latter.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-support/libpcre/libpcre_8.38.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/libpcre/libpcre_8.38.bb b/meta/recipes-support/libpcre/libpcre_8.38.bb
index 4f31f8c..384c2fe 100644
--- a/meta/recipes-support/libpcre/libpcre_8.38.bb
+++ b/meta/recipes-support/libpcre/libpcre_8.38.bb
@@ -22,12 +22,13 @@ S = "${WORKDIR}/pcre-${PV}"
 PROVIDES += "pcre"
 DEPENDS += "bzip2 zlib"
 
-PACKAGECONFIG ??= "pcre8"
+PACKAGECONFIG ??= "pcre8 unicode-properties"
 
 PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
 PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
 PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
 PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
+PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
 
 BINCONFIG = "${bindir}/pcre-config"
 
@@ -36,7 +37,7 @@ inherit autotools binconfig-disabled ptest
 EXTRA_OECONF = "\
     --enable-newline-is-lf \
     --enable-rebuild-chartables \
-    --enable-utf8 \
+    --enable-utf \
     --with-link-size=2 \
     --with-match-limit=10000000 \
 "
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] glib-2.0: use the system libpcre
  2016-02-05 11:47 [PATCH 1/3] python3: remove optimize by default patch Ross Burton
  2016-02-05 11:47 ` [PATCH 2/3] libpcre: enable unicode properties by default Ross Burton
@ 2016-02-05 11:47 ` Ross Burton
  2016-02-05 13:32   ` Joshua G Lock
  1 sibling, 1 reply; 5+ messages in thread
From: Ross Burton @ 2016-02-05 11:47 UTC (permalink / raw)
  To: openembedded-core

Instead of using the internal copy of libpcre, use one that we build.  Note that
this requires libpcre enables Unicode properties.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/glib-2.0/glib.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index dc88d19..7a6a4ce 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -31,6 +31,9 @@ inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even
 
 S = "${WORKDIR}/glib-${PV}"
 
+PACKAGECONFIG ??= "system-pcre"
+PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-pcre=internal,libpcre"
+
 CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-man"
 
 PRINTF = "--enable-included-printf=no"
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] glib-2.0: use the system libpcre
  2016-02-05 11:47 ` [PATCH 3/3] glib-2.0: use the system libpcre Ross Burton
@ 2016-02-05 13:32   ` Joshua G Lock
  2016-02-05 14:35     ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Joshua G Lock @ 2016-02-05 13:32 UTC (permalink / raw)
  To: openembedded-core

On Fri, 2016-02-05 at 11:47 +0000, Ross Burton wrote:
> Instead of using the internal copy of libpcre, use one that we
> build.  Note that
> this requires libpcre enables Unicode properties.

We could do with a convention for documenting this kind of trap (where
a PACKAGECONFIG in foo requires one in bar). 

Maybe you could a comment here in this case?

Regards,

Joshua

> 
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/recipes-core/glib-2.0/glib.inc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-
> core/glib-2.0/glib.inc
> index dc88d19..7a6a4ce 100644
> --- a/meta/recipes-core/glib-2.0/glib.inc
> +++ b/meta/recipes-core/glib-2.0/glib.inc
> @@ -31,6 +31,9 @@ inherit autotools gettext gtk-doc pkgconfig ptest-
> gnome upstream-version-is-even
>  
>  S = "${WORKDIR}/glib-${PV}"
>  
> +PACKAGECONFIG ??= "system-pcre"
> +PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-
> pcre=internal,libpcre"
> +
>  CORECONF = "--disable-dtrace --disable-fam --disable-libelf --
> disable-systemtap --disable-man"
>  
>  PRINTF = "--enable-included-printf=no"
> -- 
> 2.7.0
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] glib-2.0: use the system libpcre
  2016-02-05 13:32   ` Joshua G Lock
@ 2016-02-05 14:35     ` Burton, Ross
  0 siblings, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2016-02-05 14:35 UTC (permalink / raw)
  To: Joshua G Lock; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

On 5 February 2016 at 13:32, Joshua G Lock <joshua.g.lock@linux.intel.com>
wrote:

> We could do with a convention for documenting this kind of trap (where
> a PACKAGECONFIG in foo requires one in bar).
>
> Maybe you could a comment here in this case?
>

Yeah fair point.  Comment added in my branch.

Ross

[-- Attachment #2: Type: text/html, Size: 740 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-05 14:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-05 11:47 [PATCH 1/3] python3: remove optimize by default patch Ross Burton
2016-02-05 11:47 ` [PATCH 2/3] libpcre: enable unicode properties by default Ross Burton
2016-02-05 11:47 ` [PATCH 3/3] glib-2.0: use the system libpcre Ross Burton
2016-02-05 13:32   ` Joshua G Lock
2016-02-05 14:35     ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.