scons,python: Update makeTheGPUISA to Python3
authorBobby R. Bruce <bbruce@ucdavis.edu>
Mon, 25 May 2020 23:32:56 +0000 (16:32 -0700)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 26 May 2020 09:14:09 +0000 (09:14 +0000)
This function was causing an error to occur when trying to compile HSAIL
and GCN in a Python3 environment. It has now been upgraded to work in
both Python2 and Python3.

Change-Id: If8d6ee1e08c47d5a36182afc10cf86a8e905bda0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29410
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/SConscript

index 1de8a2d75478f4624d0b021e0b0d858a5020590b..7cd628a7c872af194a7cfb120540b972af6c65cf 100644 (file)
@@ -666,7 +666,7 @@ env.Command('config/the_isa.hh', list(map(Value, all_isa_list)),
             MakeAction(makeTheISA, Transform("CFG ISA", 0)))
 
 def makeTheGPUISA(source, target, env):
-    isas = [ src.get_contents() for src in source ]
+    isas = [ src.get_contents().decode('utf-8') for src in source ]
     target_gpu_isa = env['TARGET_GPU_ISA']
     def define(isa):
         return str(isa.upper()) + '_ISA'