Fix building AMD MM/GL with EL7

This partially reverts commit 4d9acfa533.

The original patch said:

"Python 3 handles unicode strings by default, so we can drop all that."

But this breaks building on RHEL 7 (or similiar) since python3 support
on is much more limited than newer distros. Backporting all the needed
python 3 libraries to EL7 is a pretty big task, and isn't very easy to
maintain.

For workstation purposes, we need the AMD MM/GL driver building on RHEL
7, so only src/util/driconf_static.py needs to be reverted.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12549>
This commit is contained in:
Jeremy Newton
2021-08-25 17:03:23 -04:00
committed by Marge Bot
parent 4b8f2b99e8
commit 80b5f4ff08
+2 -2
View File
@@ -223,6 +223,6 @@ static const struct driconf_device *driconf[] = {
xml = sys.argv[1]
dst = sys.argv[2]
with open(dst, 'w') as f:
f.write(Template(template).render(driconf=DriConf(xml)))
with open(dst, 'wb') as f:
f.write(Template(template, output_encoding='utf-8').render(driconf=DriConf(xml)))