From 1dead59ec644664b4eed4dc97d0878159ff51892 Mon Sep 17 00:00:00 2001 From: Martin Kampas Date: Thu, 10 Dec 2020 10:10:34 +0100 Subject: [PATCH] [sb2] Fix generating argv/envp processing rules for host-gcc. JB#52287 This fixes commit dbcf9d6015bfbfae767b64aa11ba553ac105cc81 (support different gcc search patchs) --- scratchbox2/lua_scripts/argvenvp_gcc.lua | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/scratchbox2/lua_scripts/argvenvp_gcc.lua b/scratchbox2/lua_scripts/argvenvp_gcc.lua index 8fda8e08..2e95e349 100644 --- a/scratchbox2/lua_scripts/argvenvp_gcc.lua +++ b/scratchbox2/lua_scripts/argvenvp_gcc.lua @@ -73,17 +73,15 @@ function register_gcc_component_path(tmp, gccrule) table.insert(gcc_tools_path_prefixes, x) end - if gccrule == nil then - return - end - - if gccrule.cross_gcc_dir ~= nil then - table.insert(gcc_tools_path_prefixes, gccrule.cross_gcc_dir) - end + if gccrule ~= nil then + if gccrule.cross_gcc_dir ~= nil then + table.insert(gcc_tools_path_prefixes, gccrule.cross_gcc_dir) + end - if gccrule.cross_gcc_progs_path ~= nil then - for path in string.gmatch(gccrule.cross_gcc_progs_path,"[^:]+") do - table.insert(gcc_tools_path_prefixes, path) + if gccrule.cross_gcc_progs_path ~= nil then + for path in string.gmatch(gccrule.cross_gcc_progs_path,"[^:]+") do + table.insert(gcc_tools_path_prefixes, path) + end end end