aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2017-10-26 17:24:03 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2018-04-16 09:54:19 +0300
commita8a614fdbb93be7b12af4616fb456d0d9c843de7 (patch)
treece07a89c3966950e5ce370bd66d5d61c3c748f16
parentf124b3d63392c5d4efecd65e9330b4a1ec8d55e5 (diff)
downloadopenembedded-core-contrib-a8a614fdbb93be7b12af4616fb456d0d9c843de7.tar.gz
python3-profile-opt: rename libpython3
Prevents soname clash with "normal" libpython3. The python library needs to be renamed so that the automatic ndency generation/checking mechanism in bitbake does not get confused. Otherwise python3-profile-opt will depend on libpython3 from the "normal" python3 package. [YOCTO #9338] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r--meta/recipes-devtools/python/python3-profile-opt_3.5.5.bb1
-rw-r--r--meta/recipes-devtools/python/python3/rename-libpython3-to-libpython-profile-opt3.patch108
2 files changed, 109 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-profile-opt_3.5.5.bb b/meta/recipes-devtools/python/python3-profile-opt_3.5.5.bb
index 6940480546..3ad427117f 100644
--- a/meta/recipes-devtools/python/python3-profile-opt_3.5.5.bb
+++ b/meta/recipes-devtools/python/python3-profile-opt_3.5.5.bb
@@ -1,6 +1,7 @@
require python3_${PV}.bb
SRC_URI += "file://Makefile-add-install_generate_profile-target.patch \
+ file://rename-libpython3-to-libpython-profile-opt3.patch \
"
PYTHON3_MAKE_TARGET = "build_all_generate_profile"
diff --git a/meta/recipes-devtools/python/python3/rename-libpython3-to-libpython-profile-opt3.patch b/meta/recipes-devtools/python/python3/rename-libpython3-to-libpython-profile-opt3.patch
new file mode 100644
index 0000000000..e0aa046e25
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/rename-libpython3-to-libpython-profile-opt3.patch
@@ -0,0 +1,108 @@
+rename libpython3 to libpython-profile-opt3
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+
+diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
+index 7c278ef..78613d8 100644
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -747,7 +747,7 @@ class build_ext(Command):
+ else:
+ from distutils import sysconfig
+ if sysconfig.get_config_var('Py_ENABLE_SHARED'):
+- pythonlib = 'python{}.{}{}'.format(
++ pythonlib = 'python-profile-opt{}.{}{}'.format(
+ sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff,
+ sysconfig.get_config_var('ABIFLAGS'))
+ return ext.libraries + [pythonlib]
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index c7b8e1e..25bff02 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -592,7 +592,7 @@ $(LIBRARY): $(LIBRARY_OBJS)
+ $(AR) $(ARFLAGS) $@ $(MODOBJS)
+ $(RANLIB) $@
+
+-libpython$(LDVERSION).so: $(LIBRARY_OBJS)
++libpython-profile-opt$(LDVERSION).so: $(LIBRARY_OBJS)
+ if test $(INSTSONAME) != $(LDLIBRARY); then \
+ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+ $(LN) -f $(INSTSONAME) $@; \
+@@ -600,7 +600,7 @@ libpython$(LDVERSION).so: $(LIBRARY_OBJS)
+ $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+ fi
+
+-libpython3.so: libpython$(LDVERSION).so
++libpython-profile-opt3.so: libpython-profile-opt$(LDVERSION).so
+ $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
+
+ libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
+diff --git a/Misc/python-config.in b/Misc/python-config.in
+index a808f1a..0dcc615 100644
+--- a/Misc/python-config.in
++++ b/Misc/python-config.in
+@@ -47,7 +47,7 @@ for opt in opt_flags:
+ print(' '.join(flags))
+
+ elif opt in ('--libs', '--ldflags'):
+- libs = ['-lpython' + pyver + sys.abiflags]
++ libs = ['-lpython-profile-opt' + pyver + sys.abiflags]
+ 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-config.sh.in b/Misc/python-config.sh.in
+index 30c6927..efad748 100644
+--- a/Misc/python-config.sh.in
++++ b/Misc/python-config.sh.in
+@@ -40,7 +40,7 @@ LIBM="@LIBM@"
+ LIBC="@LIBC@"
+ SYSLIBS="$LIBM $LIBC"
+ ABIFLAGS="@ABIFLAGS@"
+-LIBS="-lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS"
++LIBS="-lpython-profile-opt${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS"
+ BASECFLAGS="@BASECFLAGS@"
+ LDLIBRARY="@LDLIBRARY@"
+ LINKFORSHARED="@LINKFORSHARED@"
+diff --git a/Misc/python.pc.in b/Misc/python.pc.in
+index ae69867..b73d027 100644
+--- a/Misc/python.pc.in
++++ b/Misc/python.pc.in
+@@ -9,5 +9,5 @@ Description: Python library
+ Requires:
+ Version: @VERSION@
+ Libs.private: @LIBS@
+-Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@
++Libs: -L${libdir} -lpython-profile-opt@VERSION@@ABIFLAGS@
+ Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@
+diff --git a/configure.ac b/configure.ac
+index 0227280..55af309 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -992,7 +992,7 @@ AC_SUBST(LIBRARY)
+ AC_MSG_CHECKING(LIBRARY)
+ if test -z "$LIBRARY"
+ then
+- LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
++ LIBRARY='libpython-profile-opt$(VERSION)$(ABIFLAGS).a'
+ fi
+ AC_MSG_RESULT($LIBRARY)
+
+@@ -1153,13 +1153,13 @@ if test $enable_shared = "yes"; then
+ fi
+ ;;
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
+- LDLIBRARY='libpython$(LDVERSION).so'
+- BLDLIBRARY='-L. -lpython$(LDVERSION)'
++ LDLIBRARY='libpython-profile-opt$(LDVERSION).so'
++ BLDLIBRARY='-L. -lpython-profile-opt$(LDVERSION)'
+ RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
+ INSTSONAME="$LDLIBRARY".$SOVERSION
+ if test "$with_pydebug" != yes
+ then
+- PY3LIBRARY=libpython3.so
++ PY3LIBRARY=libpython-profile-opt3.so
+ fi
+ ;;
+ hp*|HP*)