From b46fb4f08c1df0e80d6a2a6de362629901a8fdbc Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 1 Jul 2019 18:38:18 +0200 Subject: [PATCH] phase1: prevent ccache/gcc exec recursion when cc_version is unset Signed-off-by: Jo-Philipp Wich --- phase1/master.cfg | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/phase1/master.cfg b/phase1/master.cfg index 1061eb2..5eb3f9a 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -478,26 +478,33 @@ for target in targets: command = ["nproc"])) # find gcc and g++ compilers - if cc_version is not None: - factory.addStep(FileDownload( - name = "dlfindbinpl", - mastersrc = scripts_dir + '/findbin.pl', - slavedest = "../findbin.pl", - mode = 0755)) + factory.addStep(FileDownload( + name = "dlfindbinpl", + mastersrc = scripts_dir + '/findbin.pl', + slavedest = "../findbin.pl", + mode = 0755)) - factory.addStep(SetPropertyFromCommand( - name = "gcc", - property = "cc_command", - description = "Finding gcc command", - command = ["../findbin.pl", "gcc", cc_version[0], cc_version[1]], - haltOnFailure = True)) + factory.addStep(SetPropertyFromCommand( + name = "gcc", + property = "cc_command", + description = "Finding gcc command", + command = [ + "../findbin.pl", "gcc", + cc_version[0] if cc_version is not None else '', + cc_version[1] if cc_version is not None else '' + ], + haltOnFailure = True)) - factory.addStep(SetPropertyFromCommand( - name = "g++", - property = "cxx_command", - description = "Finding g++ command", - command = ["../findbin.pl", "g++", cc_version[0], cc_version[1]], - haltOnFailure = True)) + factory.addStep(SetPropertyFromCommand( + name = "g++", + property = "cxx_command", + description = "Finding g++ command", + command = [ + "../findbin.pl", "g++", + cc_version[0] if cc_version is not None else '', + cc_version[1] if cc_version is not None else '' + ], + haltOnFailure = True)) # see if ccache is available factory.addStep(SetPropertyFromCommand( -- 2.30.2