From 77b2b5eff7ffc6a02fdb0a643d7c47668841e3a8 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 5 Nov 2021 10:43:16 +0000 Subject: [PATCH] gem5/gem5: fix the build with Python 3.10 gem5 imported collections.Mapping, but this was deprecated in 3.3 and removed in 3.10. Signed-off-by: Ross Burton Signed-off-by: Jon Mason --- .../recipes-devtools/gem5/files/mapping.patch | 37 +++++++++++++++++++ .../recipes-devtools/gem5/gem5-source_20.inc | 3 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 meta-gem5/recipes-devtools/gem5/files/mapping.patch diff --git a/meta-gem5/recipes-devtools/gem5/files/mapping.patch b/meta-gem5/recipes-devtools/gem5/files/mapping.patch new file mode 100644 index 00000000..5eb34d82 --- /dev/null +++ b/meta-gem5/recipes-devtools/gem5/files/mapping.patch @@ -0,0 +1,37 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From 89958f7f30ec722e30e1bcffdeab547c874fa475 Mon Sep 17 00:00:00 2001 +From: Adrian Herrera +Date: Mon, 15 Mar 2021 13:14:44 +0000 +Subject: [PATCH] python: debug, fix Mapping import + +Change "collections.Mapping" to "collections.abc.Mapping". +"collections.Mapping" was an alias, it is deprecated starting from Python 3.3, and it will be removed in Python 3.10. + +Change-Id: Ic257e3c5206eb3d48d4eed85a93fac48bd3b8dc4 +Signed-off-by: Adrian Herrera +Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43023 +Reviewed-by: Jason Lowe-Power +Maintainer: Jason Lowe-Power +Tested-by: kokoro +--- + src/python/m5/debug.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/python/m5/debug.py b/src/python/m5/debug.py +index d808850cc..787a39ece 100644 +--- a/src/python/m5/debug.py ++++ b/src/python/m5/debug.py +@@ -24,7 +24,7 @@ + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-from collections import Mapping ++from collections.abc import Mapping + + import _m5.debug + from _m5.debug import SimpleFlag, CompoundFlag +-- +2.25.1 + diff --git a/meta-gem5/recipes-devtools/gem5/gem5-source_20.inc b/meta-gem5/recipes-devtools/gem5/gem5-source_20.inc index aafc54be..bf448fef 100644 --- a/meta-gem5/recipes-devtools/gem5/gem5-source_20.inc +++ b/meta-gem5/recipes-devtools/gem5/gem5-source_20.inc @@ -1,7 +1,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2d9514d69d8abf88b6e9125e759bf0ab \ file://LICENSE;md5=a585e2893cee63d16a1d8bc16c6297ec" -SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https;nobranch=1" +SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https;nobranch=1 \ + file://mapping.patch" RELEASE_TAG = "v20.1.0.5" SRCREV = "31cd81fdec46bae4b48d4f3788776936389dbdec"