All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Duskett <aduskett@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] qemu: add support for python 3.6
Date: Fri, 27 Apr 2018 11:40:55 -0400	[thread overview]
Message-ID: <20180427154055.23272-2-aduskett@gmail.com> (raw)
In-Reply-To: <20180427154055.23272-1-aduskett@gmail.com>

qemu 2.12.0 now supports building against python3.
see: https://wiki.qemu.org/ChangeLog/2.12#Build_Dependencies

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/qemu/qemu.mk | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 975dfba490..6a24e2848d 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -16,7 +16,7 @@ QEMU_LICENSE_FILES = COPYING COPYING.LIB
 #-------------------------------------------------------------
 # Host-qemu
 
-HOST_QEMU_DEPENDENCIES = host-pkgconf host-python host-zlib host-libglib2 host-pixman
+HOST_QEMU_DEPENDENCIES = host-pkgconf host-zlib host-libglib2 host-pixman
 
 #       BR ARCH         qemu
 #       -------         ----
@@ -119,6 +119,16 @@ HOST_QEMU_OPTS += --enable-vde
 HOST_QEMU_DEPENDENCIES += host-vde2
 endif
 
+ifeq ($(BR2_PACKAGE_PYTHON3),y)
+HOST_QEMU_DEPENDENCIES += host-python3
+QEMU_DEPENDENCIES += host-python3
+QEMU_PYLIBVER = python$(PYTHON3_VERSION_MAJOR)
+else
+HOST_QEMU_DEPENDENCIES += host-python
+QEMU_DEPENDENCIES += host-python
+QEMU_PYLIBVER = python$(PYTHON_VERSION_MAJOR)
+endif
+
 # Override CPP, as it expects to be able to call it like it'd
 # call the compiler.
 define HOST_QEMU_CONFIGURE_CMDS
@@ -129,7 +139,7 @@ define HOST_QEMU_CONFIGURE_CMDS
 		--interp-prefix=$(STAGING_DIR) \
 		--cc="$(HOSTCC)" \
 		--host-cc="$(HOSTCC)" \
-		--python=$(HOST_DIR)/bin/python2 \
+		--python=$(HOST_DIR)/bin/$(QEMU_PYLIBVER) \
 		--extra-cflags="$(HOST_CFLAGS)" \
 		--extra-ldflags="$(HOST_LDFLAGS)" \
 		$(HOST_QEMU_OPTS)
@@ -151,7 +161,7 @@ QEMU_USER = $(HOST_DIR)/bin/qemu-$(HOST_QEMU_ARCH)
 #-------------------------------------------------------------
 # Target-qemu
 
-QEMU_DEPENDENCIES = host-pkgconf host-python libglib2 zlib pixman
+QEMU_DEPENDENCIES = host-pkgconf libglib2 zlib pixman
 
 # Need the LIBS variable because librt and libm are
 # not automatically pulled. :-(
@@ -161,8 +171,8 @@ QEMU_OPTS =
 
 QEMU_VARS = \
 	LIBTOOL=$(HOST_DIR)/bin/libtool \
-	PYTHON=$(HOST_DIR)/bin/python2 \
-	PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
+	PYTHON=$(HOST_DIR)/bin/$(QEMU_PYLIBVER) \
+	PYTHONPATH=$(TARGET_DIR)/usr/lib/$(QEMU_PYLIBVER)/site-packages
 
 # If we want to specify only a subset of targets, we must still enable all
 # of them, so that QEMU properly builds its list of default targets, from
-- 
2.14.3

  reply	other threads:[~2018-04-27 15:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 15:40 [Buildroot] [PATCH 1/2] qemu: bump to 2.12.0 Adam Duskett
2018-04-27 15:40 ` Adam Duskett [this message]
2018-05-01 15:01   ` [Buildroot] [PATCH 2/2] qemu: add support for python 3.6 Romain Naour
2018-08-20 22:31   ` Thomas Petazzoni
2018-05-01 14:58 ` [Buildroot] [PATCH 1/2] qemu: bump to 2.12.0 Romain Naour
2018-05-02 13:21   ` Adam Duskett
2018-05-04 19:58     ` Romain Naour
2018-08-10 21:59 ` Thomas Petazzoni

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=20180427154055.23272-2-aduskett@gmail.com \
    --to=aduskett@gmail.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.