From patchwork Thu Sep 6 11:15:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 146075 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp371947ljw; Thu, 6 Sep 2018 04:15:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbAkELbcTK4UB/gUc2NJofTMvn6xgrmmP+P0Siu5F4wNKUQ7NQsBeXtggSpYmCoqWE2OKn/ X-Received: by 2002:a17:902:934a:: with SMTP id g10-v6mr2099638plp.121.1536232530567; Thu, 06 Sep 2018 04:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536232530; cv=none; d=google.com; s=arc-20160816; b=fk1bHUCh7jRNqsXE8Je530bRWzrNzv8ttdlvveBD8so7ZEu19iYRImFonM1zKa0w8R YyN6CnePOZvl/izn44aJKuyOiVkwixJbJWpRopdnpdKA4UQ+TPcubZ0gRZ/UMq7fICtb 0xzf0yXpIJW4z7bRAEkxDX5y3+aq7gNCm2dvqWEqZQinNsLuw8YgMyjnJod2uMCd38WW n5GR91y1ntrH4yGQijJBzy95osAY1UhFeGu1ifpDc+E/4th9Srx6eiRXm22JDZfUKhxb IE5w8GeDMmjW+GG9EHSm8nYwVtlBVUhRSP/WU6JxQH2pTXtbl1UcXIqKinXoywU2imsY EuDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=XzRW28NDtzWrSIX+J70aQ2yf2L5fxSACniy1iVRV0jY=; b=vWO5sdSXyRlLVInbTqiWGJvmzDbWSStxmq9y8dfJI62toZlD4qU5n5KVYvL1J6JFaH y1xZeXetQAyIGezOoYSVQDsR8EuQu4bUfgmHh494Iho37pJ0W0P6anXjzy1Pql/kSkuL D2psK2bj6K93lJbDCTY2UENRVqAGa8ANPIf7aQIVZLaasRSQO26TM7AfUyINkCTEzQT4 BnVshDMzHqML/zgHYesu27knxs0mWMKydl8FBOEWmrFwkMx5XcSikK9TQOts4o3dq2tK GAw8axk+qVEyDurfHhGXEV/bq//7sYbru9EoTZzue3OVUY7gN+sZ7cFlcuEIT3OuFtsn elIQ== 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=FL0MATUc; 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 b7-v6si5135769pfj.245.2018.09.06.04.15.30; Thu, 06 Sep 2018 04:15:30 -0700 (PDT) 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=FL0MATUc; 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 layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 424BE7965B; Thu, 6 Sep 2018 11:15:27 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by mail.openembedded.org (Postfix) with ESMTP id 9BB5D7964D for ; Thu, 6 Sep 2018 11:15:25 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id r1-v6so14107924wmh.0 for ; Thu, 06 Sep 2018 04:15:26 -0700 (PDT) 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; bh=M6d6AxbpsPG212mwO6vC6M4bg194Ke9Mi63JvScSDZ4=; b=FL0MATUcbk9E+FPc5ePMcIZG9n7Lad0zniYKTBvHOd8+fWbZXPdiO6ZIBfsHNrDA9G iJ43J7eY/YvRvUR4+kQTJUAuoB9QUkuzia0P/dPIUWBNaRSx36maRUTcXfDlnkEuDxzR DRhM2Uh6Vi4LUotghJqmc/rI3D7IzQpNyXwsggF5PMExtlbFtUKFWqoTDdgWG+JJEkib BfA7z4KNO1HE7FKLXT+LGCSwkM4G0GxChiyXS57xmU8rWPv/FmFWZbtGuS2QDOGIakwC tIc/ijF3wR8+6dFF73obZr7upglil6IVX1ul/JPH+LP2ncKPryIRrleWjxx+F2XgJR4i rcxg== 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; bh=M6d6AxbpsPG212mwO6vC6M4bg194Ke9Mi63JvScSDZ4=; b=PHlBeRvKoFll42FQwWHsY44H8624ctzyX7vT4dYGnLomK2htmCkCed+GxemOB1AMWS iIlkwJiKc5pISOmvUTC6KkXBD1Xzf4BMAyxIeac76rpmy1euodYE+iIXYHOleBoX+ymS TDAsYVDWaz8AeSBTCFJLLOoHcLLhB7F6RkyOWXW3/aHiC/PoSCtyFheXRRZ8VbGnQwL1 1J1uL5oAIJdbn7GlytO/TUwfs47nNPx0J6lPvh1C2F/pM+23X2A/7S9m6YpVrLYmWqoi sG0Xz0UAphiEKkmG6Bpe+agc9VRIp2+1vdMh/nrdxTUYEQPN9FXC0S1k/d5D3NYn6NHf ck0w== X-Gm-Message-State: APzg51CQsoe/A0RGhUZgBKwtylsFuIKSZ83S5aMBGxlAZQ+DoH2pFKvx 39+atdb5+3y49BKiGdzHECNc/epW+mU= X-Received: by 2002:a1c:2108:: with SMTP id h8-v6mr1745246wmh.108.1536232525863; Thu, 06 Sep 2018 04:15:25 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id f6-v6sm5519173wrr.68.2018.09.06.04.15.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Sep 2018 04:15:25 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 6 Sep 2018 12:15:17 +0100 Message-Id: <20180906111521.20997-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH 1/5] python3: generalise make commands 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: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org We're repeating the same make invocation over and over, twice without setting OPT=${CFLAGS} which doesn't seem right. Centralise the make invocation to clean up the tasks. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3_3.5.5.bb | 48 +++++++++------------------ 1 file changed, 16 insertions(+), 32 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/python/python3_3.5.5.bb b/meta/recipes-devtools/python/python3_3.5.5.bb index 9e31fa6f299..8e94e38a2d5 100644 --- a/meta/recipes-devtools/python/python3_3.5.5.bb +++ b/meta/recipes-devtools/python/python3_3.5.5.bb @@ -95,6 +95,18 @@ do_configure_append() { autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi } +run_make() { + oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ + HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ + LIB=${baselib} \ + ARCH=${TARGET_ARCH} \ + OPT="${CFLAGS}" \ + "$@" +} + do_compile() { # regenerate platform specific files, because they depend on system headers cd ${S}/Lib/plat-linux* @@ -125,14 +137,7 @@ do_compile() { # then call do_install twice we get Makefile.orig == Makefile.sysroot install -m 0644 Makefile Makefile.sysroot - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ - LIB=${baselib} \ - ARCH=${TARGET_ARCH} \ - OPT="${CFLAGS}" profile-opt + run_make profile-opt if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true', 'false', d)}; then qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])}" @@ -145,14 +150,7 @@ EOF ./pgo-image-qemuwrapper ${B}/python ${PYTHON3_PROFILE_TASK} || true fi - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ - LIB=${baselib} \ - ARCH=${TARGET_ARCH} \ - OPT="${CFLAGS}" clean_and_use_profile + run_make clean_and_use_profile } do_install() { @@ -165,23 +163,9 @@ do_install() { # rerun the build once again with original makefile this time # run install in a separate step to avoid compile/install race - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ - LIB=${baselib} \ - ARCH=${TARGET_ARCH} \ - DESTDIR=${D} LIBDIR=${libdir} build_all_use_profile + run_make DESTDIR=${D} LIBDIR=${libdir} build_all_use_profile - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ - LIB=${baselib} \ - ARCH=${TARGET_ARCH} \ - DESTDIR=${D} LIBDIR=${libdir} install + run_make DESTDIR=${D} LIBDIR=${libdir} install # avoid conflict with 2to3 from Python 2 rm -f ${D}/${bindir}/2to3