From patchwork Wed Nov 27 14:00:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 180299 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6156913ilf; Wed, 27 Nov 2019 06:00:40 -0800 (PST) X-Google-Smtp-Source: APXvYqx5Hr355KTmVgFwnFjPsUywhXfBk1JG6WbrN9dff1sp4eNUDMh7gL29jS/gC5vkjHF9qfIf X-Received: by 2002:a62:2a4c:: with SMTP id q73mr46555308pfq.94.1574863240674; Wed, 27 Nov 2019 06:00:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574863240; cv=none; d=google.com; s=arc-20160816; b=ifW//hsL1WYrzfvbtwFwnFGSDFrIhZkgiKOSTPP8Po1bEOMH9sSDEoYeDcDFLz5bY7 5/tduSBvcmMXOZ34AOIGIElnoAy19bjI829GpaLTsAlbJdLnZUZfOgs5dmXHK/qhX2iC bqCA30KdZ8DhvHtZn2CqlPFEBOjGFIquvoFxDPngEMJqNCV8P/7cvdEolcJ6Z3Iy0T17 WDqrIH6x5YdRtIaWqbFMW7BKFGLKyN6Z7q34PpaDR6AlWBNmI96N6z6rKPtRDwTsWqcE XaeORmi3Q6dwhqo/1Pf3hRTlU9HiYicLiHYXkg9SvWh92u+vDrgrjuuB6+P/Am+MGMqN Q8qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=OQAKkB8q6GSqmhoTLuauhA7V7Mso+pGDq9euo5gw2Gs=; b=f9IdosqF1FMYeWtnglH8SIFwQPtj+tJGciYLbCELGOsOQEatM1NiuyAzf+Nr3QV2GM qi4nNgKnEs7XKWRxxn9ZAG7lIJI+aWsLJqO6nHzJ2DL9bPmgTefA2EK6sAcjTquUdFVF Wf+m7dDisuDXsmBaWFIPna05b/l6WQI3ARcvn4HYW4CvtfxrcnDCrNddGX09SQ4jTECB X/We4jzuAttYx2SR5dldsxVbR3pCRvGI+Jrj9erE0t8bGZ1p2Uxqyzl/d//jG4Hoi+0t sbcJeJHjz8zQFmo5WmuuyXHrj/CmsUTP98ZTesX7R/zPoSilippfboMq7RdI4hsy2NUH OGPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=IAQrTFsd; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id r8si14907929pgp.556.2019.11.27.06.00.40; Wed, 27 Nov 2019 06:00:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=IAQrTFsd; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 4EAB97FBC6; Wed, 27 Nov 2019 14:00:37 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mail.openembedded.org (Postfix) with ESMTP id A4C557FA45 for ; Wed, 27 Nov 2019 14:00:35 +0000 (UTC) Received: by mail-wr1-f51.google.com with SMTP id i12so26874494wro.5 for ; Wed, 27 Nov 2019 06:00:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=haCTNdolDgAr5vc2azaUOWwy4yiz2cVcD3OcWNNSDI8=; b=IAQrTFsdR5Q3j/r9r00S7fvMXrXqXr6UCbtO1i94jhxa/hinEZdJQl58T8u02pqWlC rRf4KE/DbvCUY3vCv3LykASET09Uf1xLq/kL7cYEQAuOOfnilfn7P8+gSf98oG2dS3Ix Hedc4MjlyaPH9GVBnyzkK6hHGxVJFysYEeSlYDr0L7ktRGQPdHxQ2EwlrpPuT+dgx8/S VjLsmnoi7wNo6U73yc+mu5YWpU+tWRUBGB+nORocorTLK4g/QN3tG9QGy2Vl3DxwjpNF ue05JqQhl8+pgbu+9ghvauZMHQi0zOHHDt8/QYsXt88RI+c0L+oXaDyXzYiuUgDF/msy NQzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=haCTNdolDgAr5vc2azaUOWwy4yiz2cVcD3OcWNNSDI8=; b=TL/Mvk84XLQAQU+ufi1yrsN7MjuH6Apx80l3EmSW+2Iw/r173ba9tvLbKPjoSxefOJ qcHw0REunOVmZyfdCStoPKTfpuGmdvipRa91tJqBNulqfIG9Mxa989r1sIUv/PnuB7B9 2LnD7gduHg1jyIRSomWAG0w+CoTG8AlIkjmKRR3z3lyeS7AQ22n0aqVX2Rcet6/gDSoz G55bk7tKnG+h4zCtkkWNoJvi2NOCa7kTtQy0B559bUYBiw7XU9ESnFguCnsy2M04TUR2 lz4eNMbpKQR8o0GzGeWEShDhf6LC7kw42WcgC4+CcpDtABxbShucFnz7zDyhF9OFQYlx MUKg== X-Gm-Message-State: APjAAAUrWmvHQhMxyfoBkJIfehUqr/y3mL1mivEKhRdf19m1kAz69p5h FTsR+LedRWx8VZaP9I5X79uxSy2AbY4= X-Received: by 2002:a05:6000:1286:: with SMTP id f6mr38490418wrx.44.1574863235927; Wed, 27 Nov 2019 06:00:35 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id o1sm19372284wrs.50.2019.11.27.06.00.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 06:00:34 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Wed, 27 Nov 2019 14:00:25 +0000 Message-Id: <20191127140030.7838-1-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH 1/6] python: no need to add HOSTPGEN X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org There's no need to patch in HOSTPGEN when we can just override PGEN directly. Signed-off-by: Ross Burton --- .../01-use-proper-tools-for-cross-build.patch | 17 ----------------- meta/recipes-devtools/python/python_2.7.17.bb | 9 ++++++--- 2 files changed, 6 insertions(+), 20 deletions(-) -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core 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 e795a74b911..7d8e95fe5cc 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 =================================================================== --- Python-2.7.13.orig/Makefile.pre.in +++ Python-2.7.13/Makefile.pre.in -@@ -245,6 +245,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ - ########################################################################## - # Parser - PGEN= Parser/pgen$(EXE) -+HOSTPGEN= $(PGEN)$(EXE) - - PSRCS= \ - Parser/acceler.c \ @@ -512,7 +513,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) @@ -33,15 +25,6 @@ Index: Python-2.7.13/Makefile.pre.in # Create build directory and generate the sysconfig build-time data there. # pybuilddir.txt contains the name of the build dir and is used for -@@ -663,7 +663,7 @@ - # Regenerate Include/graminit.h and Python/graminit.c - # from Grammar/Grammar using pgen - @$(MKDIR_P) Include -- $(PGEN) $(srcdir)/Grammar/Grammar \ -+ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \ - $(srcdir)/Include/graminit.h \ - $(srcdir)/Python/graminit.c - @@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL $(DESTDIR)$(LIBDEST)/distutils/tests ; \ fi diff --git a/meta/recipes-devtools/python/python_2.7.17.bb b/meta/recipes-devtools/python/python_2.7.17.bb index 5b856a50977..6199a5da760 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" PACKAGECONFIG[bdb] = ",,db" PACKAGECONFIG[tk] = ",,tk" +# pgen isn't needed in the current build, but use the binary from python-native just in case. +EXTRA_OEMAKE = "PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen" + do_configure_append() { rm -f ${S}/Makefile.orig autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi @@ -82,7 +85,7 @@ do_compile() { export CROSS_COMPILE="${TARGET_PREFIX}" export PYTHONBUILDDIR="${B}" - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ + oe_runmake \ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ STAGING_LIBDIR=${STAGING_LIBDIR} \ STAGING_INCDIR=${STAGING_INCDIR} \ @@ -100,7 +103,7 @@ do_install() { # After swizzling the makefile, we need to run the build again. # install can race with the build so we have to run this first, then install - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ + oe_runmake \ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ STAGING_LIBDIR=${STAGING_LIBDIR} \ @@ -108,7 +111,7 @@ do_install() { STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ DESTDIR=${D} LIBDIR=${libdir} - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ + oe_runmake \ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ STAGING_LIBDIR=${STAGING_LIBDIR} \