From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 04/20] python-profile-opt: rename libpython
Date: Mon, 20 Feb 2017 12:35:35 +0200 [thread overview]
Message-ID: <20170220103551.20022-4-markus.lehtonen@linux.intel.com> (raw)
In-Reply-To: <20170220103551.20022-1-markus.lehtonen@linux.intel.com>
The python library needs to be renamed so that the automatic dependency
generation/checking mechanism in bitbake does not get confused.
Otherwise python-profile-opt will depend on libpython from the "normal"
python package.
[YOCTO #9338]
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
---
.../python/python-profile-opt_2.7.12.bb | 6 +-
...rename-libpython-to-libpython-profile-opt.patch | 94 ++++++++++++++++++++++
2 files changed, 95 insertions(+), 5 deletions(-)
create mode 100644 meta/recipes-devtools/python/python/rename-libpython-to-libpython-profile-opt.patch
diff --git a/meta/recipes-devtools/python/python-profile-opt_2.7.12.bb b/meta/recipes-devtools/python/python-profile-opt_2.7.12.bb
index 058cc63..df5eee8 100644
--- a/meta/recipes-devtools/python/python-profile-opt_2.7.12.bb
+++ b/meta/recipes-devtools/python/python-profile-opt_2.7.12.bb
@@ -1,7 +1,6 @@
require python_${PV}.bb
-PROVIDES += "libpython2"
-RPROVIDES_${PN}-core += "libpython2"
+SRC_URI += "file://rename-libpython-to-libpython-profile-opt.patch"
# Use special prefix in order to prevent clash with normal python
STAGING_INCDIR_DEFAULT = "${STAGING_DIR_HOST}/usr/include"
@@ -12,6 +11,3 @@ prefix = "/opt"
exec_prefix = "/opt"
PYTHON_MAKE_TARGET = "build_all_generate_profile"
-
-# Force pkgdata not to clash with python recipe
-PKG_libpython-profile-opt2 = "libpython-profile-opt2.7-1.0"
diff --git a/meta/recipes-devtools/python/python/rename-libpython-to-libpython-profile-opt.patch b/meta/recipes-devtools/python/python/rename-libpython-to-libpython-profile-opt.patch
new file mode 100644
index 0000000..06bb4c0
--- /dev/null
+++ b/meta/recipes-devtools/python/python/rename-libpython-to-libpython-profile-opt.patch
@@ -0,0 +1,94 @@
+From bc4690886248d87c019cf3c955d5349327f6fdfc Mon Sep 17 00:00:00 2001
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Mon, 17 Oct 2016 15:58:21 +0300
+Subject: [PATCH] rename libpython to libpython-profile-opt
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ Lib/distutils/command/build_ext.py | 2 +-
+ Makefile.pre.in | 2 +-
+ Misc/python-config.in | 2 +-
+ Misc/python.pc.in | 2 +-
+ configure.ac | 6 +++---
+ 5 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
+index 3a49454..56cabce 100644
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -758,7 +758,7 @@ class build_ext (Command):
+ else:
+ from distutils import sysconfig
+ if sysconfig.get_config_var('Py_ENABLE_SHARED'):
+- template = "python%d.%d"
++ template = "python-profile-opt%d.%d"
+ pythonlib = (template %
+ (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
+ return ext.libraries + [pythonlib]
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index d4b81dc..43fe5fe 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -562,7 +562,7 @@ $(LIBRARY): $(LIBRARY_OBJS)
+ $(AR) $(ARFLAGS) $@ $(MODOBJS)
+ $(RANLIB) $@
+
+-libpython$(VERSION).so: $(LIBRARY_OBJS)
++libpython-profile-opt$(VERSION).so: $(LIBRARY_OBJS)
+ if test $(INSTSONAME) != $(LDLIBRARY); then \
+ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+ $(LN) -f $(INSTSONAME) $@; \
+diff --git a/Misc/python-config.in b/Misc/python-config.in
+index 9ee0fdf..9fb149d 100644
+--- a/Misc/python-config.in
++++ b/Misc/python-config.in
+@@ -44,7 +44,7 @@ for opt in opt_flags:
+ print ' '.join(flags)
+
+ elif opt in ('--libs', '--ldflags'):
+- libs = ['-lpython' + pyver]
++ libs = ['-lpython-profile-opt' + pyver]
+ libs += getvar('LIBS').split()
+ libs += getvar('SYSLIBS').split()
+ # add the prefix/lib/pythonX.Y/config dir, but only if there is no
+diff --git a/Misc/python.pc.in b/Misc/python.pc.in
+index 08481a9..0822e54 100644
+--- a/Misc/python.pc.in
++++ b/Misc/python.pc.in
+@@ -8,6 +8,6 @@ Description: Python library
+ Requires:
+ Version: @VERSION@
+ Libs.private: @LIBS@
+-Libs: -L${libdir} -lpython@VERSION@
++Libs: -L${libdir} -lpython-profile-opt@VERSION@
+ Cflags: -I${includedir}/python@VERSION@
+
+diff --git a/configure.ac b/configure.ac
+index 353b533..0b8e399 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -765,7 +765,7 @@ AC_SUBST(LIBRARY)
+ AC_MSG_CHECKING(LIBRARY)
+ if test -z "$LIBRARY"
+ then
+- LIBRARY='libpython$(VERSION).a'
++ LIBRARY='libpython-profile-opt$(VERSION).a'
+ fi
+ AC_MSG_RESULT($LIBRARY)
+
+@@ -911,8 +911,8 @@ if test $enable_shared = "yes"; then
+ INSTSONAME="$LDLIBRARY".$SOVERSION
+ ;;
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
+- LDLIBRARY='libpython$(VERSION).so'
+- BLDLIBRARY='-L. -lpython$(VERSION)'
++ LDLIBRARY='libpython-profile-opt$(VERSION).so'
++ BLDLIBRARY='-L. -lpython-profile-opt$(VERSION)'
+ RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
+ case $ac_sys_system in
+ FreeBSD*)
+--
+2.6.6
+
--
2.10.2
next prev parent reply other threads:[~2017-02-20 10:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-20 10:35 [PATCH 01/20] python-native: support profile optimized build Markus Lehtonen
2017-02-20 10:35 ` [PATCH 02/20] python: add python-profile-opt recipe Markus Lehtonen
2017-02-20 10:35 ` [PATCH 03/20] python: remove path hack from setup.py Markus Lehtonen
2017-02-20 10:35 ` Markus Lehtonen [this message]
2017-02-20 10:35 ` [PATCH 05/20] devtools/images: add python-pgo-image Markus Lehtonen
2017-02-20 10:35 ` [PATCH 06/20] python: make profile-optimized build possible Markus Lehtonen
2017-02-20 10:35 ` [PATCH 07/20] python-pgo-image: exclude tests from the default profile target Markus Lehtonen
2017-02-20 10:35 ` [PATCH 08/20] python: add python-tools subpackage Markus Lehtonen
2017-02-20 10:35 ` [PATCH 09/20] python-pgo-image: switch python default profile task to pybench Markus Lehtonen
2017-02-20 10:35 ` [PATCH 10/20] python-pgo-image: enable sstate for do_profile Markus Lehtonen
2017-02-20 10:35 ` [PATCH 11/20] python3-native: support profile optimized build Markus Lehtonen
2017-02-20 10:35 ` [PATCH 12/20] python3: fix depends of python-tests Markus Lehtonen
2017-02-20 10:35 ` [PATCH 13/20] python3: add python-profile-opt3 recipe Markus Lehtonen
2017-02-20 10:35 ` [PATCH 14/20] python-pgo-image: profiling for python3 Markus Lehtonen
2017-02-20 10:35 ` [PATCH 15/20] python3: remove two setup.py cross-compile hacks Markus Lehtonen
2017-02-20 10:35 ` [PATCH 16/20] python3: support profile optimized build Markus Lehtonen
2017-02-20 10:35 ` [PATCH 17/20] python3: fix profile-optimized build of modules Markus Lehtonen
2017-02-20 10:35 ` [PATCH 18/20] python-pgo-image: exclude tests from the python3 profile target Markus Lehtonen
2017-02-20 10:35 ` [PATCH 19/20] python3: add python3-tools subpackage Markus Lehtonen
2017-02-20 10:35 ` [PATCH 20/20] python-pgo-image: change python3 profile target to pybench Markus Lehtonen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170220103551.20022-4-markus.lehtonen@linux.intel.com \
--to=markus.lehtonen@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox