From da1b9ad80d76156a5cbd54d3ce87edb32634ea87 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 31 Jul 2025 03:17:15 +0500 Subject: [PATCH] scripts: waifulib: xcompile: enable cross compilation automatically if CROSS_COMPILE environment variable is set --- scripts/waifulib/xcompile.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/waifulib/xcompile.py b/scripts/waifulib/xcompile.py index 42babc35..548a64dc 100644 --- a/scripts/waifulib/xcompile.py +++ b/scripts/waifulib/xcompile.py @@ -541,16 +541,10 @@ def options(opt): help='enable building for Sailfish/Aurora') xc.add_option('--emscripten', action='store_true', dest='EMSCRIPTEN', default = None, help='enable building for Emscripten') - xc.add_option('--enable-cross-compile-env', action='store_true', dest='CROSS_COMPILE_ENV', default=None, - help='like Kbuild (Linux kernel buildsystem), set toolchain from CROSS_COMPILE variable [default: %(default)s]') def configure(conf): - if conf.options.CROSS_COMPILE_ENV: - try: - toolchain_path = conf.environ['CROSS_COMPILE'] - except KeyError: - conf.fatal('Set CROSS_COMPILE environment variable to toolchain prefix (usually in form of path and triplet, ending with -)') - + if 'CROSS_COMPILE' in conf.environ: + toolchain_path = conf.environ['CROSS_COMPILE'] conf.environ['CC'] = toolchain_path + 'cc' conf.environ['CXX'] = toolchain_path + 'c++' conf.environ['STRIP'] = toolchain_path + 'strip'