summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-11-26 09:04:55 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-29 17:43:40 +0000
commite41dac1a8e5186972f892a91cef396a02247faaa (patch)
tree439ff7e7620050e930f7f7afe748c2489c81d2b5 /meta/recipes-devtools/python
parent274164d679830be0bb89498620b83ff041aa482e (diff)
downloadpoky-e41dac1a8e5186972f892a91cef396a02247faaa.tar.gz
python: no need to add HOSTPGEN
There's no need to patch in HOSTPGEN when we can just override PGEN directly. (From OE-Core rev: d274a3d3bd90d8726752c3a18bc15fdf6bc2f37d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r--meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch17
-rw-r--r--meta/recipes-devtools/python/python_2.7.17.bb9
2 files changed, 6 insertions, 20 deletions
diff --git a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
index e795a74b91..7d8e95fe5c 100644
--- a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
+++ b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
@@ -16,14 +16,6 @@ Index: Python-2.7.13/Makefile.pre.in
16=================================================================== 16===================================================================
17--- Python-2.7.13.orig/Makefile.pre.in 17--- Python-2.7.13.orig/Makefile.pre.in
18+++ Python-2.7.13/Makefile.pre.in 18+++ Python-2.7.13/Makefile.pre.in
19@@ -245,6 +245,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
20 ##########################################################################
21 # Parser
22 PGEN= Parser/pgen$(EXE)
23+HOSTPGEN= $(PGEN)$(EXE)
24
25 PSRCS= \
26 Parser/acceler.c \
27@@ -512,7 +513,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA 19@@ -512,7 +513,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
28 $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) 20 $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
29 21
@@ -33,15 +25,6 @@ Index: Python-2.7.13/Makefile.pre.in
33 25
34 # Create build directory and generate the sysconfig build-time data there. 26 # Create build directory and generate the sysconfig build-time data there.
35 # pybuilddir.txt contains the name of the build dir and is used for 27 # pybuilddir.txt contains the name of the build dir and is used for
36@@ -663,7 +663,7 @@
37 # Regenerate Include/graminit.h and Python/graminit.c
38 # from Grammar/Grammar using pgen
39 @$(MKDIR_P) Include
40- $(PGEN) $(srcdir)/Grammar/Grammar \
41+ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \
42 $(srcdir)/Include/graminit.h \
43 $(srcdir)/Python/graminit.c
44
45@@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL 28@@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
46 $(DESTDIR)$(LIBDEST)/distutils/tests ; \ 29 $(DESTDIR)$(LIBDEST)/distutils/tests ; \
47 fi 30 fi
diff --git a/meta/recipes-devtools/python/python_2.7.17.bb b/meta/recipes-devtools/python/python_2.7.17.bb
index 5b856a5097..6199a5da76 100644
--- a/meta/recipes-devtools/python/python_2.7.17.bb
+++ b/meta/recipes-devtools/python/python_2.7.17.bb
@@ -44,6 +44,9 @@ PACKAGECONFIG ??= "bdb"
44PACKAGECONFIG[bdb] = ",,db" 44PACKAGECONFIG[bdb] = ",,db"
45PACKAGECONFIG[tk] = ",,tk" 45PACKAGECONFIG[tk] = ",,tk"
46 46
47# pgen isn't needed in the current build, but use the binary from python-native just in case.
48EXTRA_OEMAKE = "PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen"
49
47do_configure_append() { 50do_configure_append() {
48 rm -f ${S}/Makefile.orig 51 rm -f ${S}/Makefile.orig
49 autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi 52 autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
@@ -82,7 +85,7 @@ do_compile() {
82 export CROSS_COMPILE="${TARGET_PREFIX}" 85 export CROSS_COMPILE="${TARGET_PREFIX}"
83 export PYTHONBUILDDIR="${B}" 86 export PYTHONBUILDDIR="${B}"
84 87
85 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ 88 oe_runmake \
86 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ 89 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
87 STAGING_LIBDIR=${STAGING_LIBDIR} \ 90 STAGING_LIBDIR=${STAGING_LIBDIR} \
88 STAGING_INCDIR=${STAGING_INCDIR} \ 91 STAGING_INCDIR=${STAGING_INCDIR} \
@@ -100,7 +103,7 @@ do_install() {
100 103
101 # After swizzling the makefile, we need to run the build again. 104 # After swizzling the makefile, we need to run the build again.
102 # install can race with the build so we have to run this first, then install 105 # install can race with the build so we have to run this first, then install
103 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ 106 oe_runmake \
104 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ 107 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
105 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ 108 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
106 STAGING_LIBDIR=${STAGING_LIBDIR} \ 109 STAGING_LIBDIR=${STAGING_LIBDIR} \
@@ -108,7 +111,7 @@ do_install() {
108 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ 111 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
109 DESTDIR=${D} LIBDIR=${libdir} 112 DESTDIR=${D} LIBDIR=${libdir}
110 113
111 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ 114 oe_runmake \
112 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ 115 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
113 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ 116 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
114 STAGING_LIBDIR=${STAGING_LIBDIR} \ 117 STAGING_LIBDIR=${STAGING_LIBDIR} \