From 6f4a7787967f53098703984e034ba26021bd6511 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 12 Oct 2022 12:18:56 +0200 Subject: [PATCH] Don't try to include x86 assembly into non-x86 based platforms when cross compiling the x11 platform on x86. --- platform/x11/detect.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/x11/detect.py b/platform/x11/detect.py index ab3da0d43..98e7f164a 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -289,8 +289,12 @@ def configure(env): env.ParseConfig("pkg-config theora theoradec --cflags --libs") else: list_of_x86 = ["x86_64", "x86", "i386", "i586"] - if any(platform.machine() in s for s in list_of_x86): - env["x86_libtheora_opt_gcc"] = True + if env["arch"] == "": + if any(platform.machine() in s for s in list_of_x86): + env["x86_libtheora_opt_gcc"] = True + else: + if any(env["arch"] in s for s in list_of_x86): + env["x86_libtheora_opt_gcc"] = True if not env["builtin_libvorbis"]: env["builtin_libogg"] = False # Needed to link against system libvorbis