From a365163ff0744f2f74c3a3b4137d98237f4bb85d Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:20:25 +1300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Fix=20ESP32=20build=20(for=20xte?= =?UTF-8?q?nsa32)=20(2)=20(#27570)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #27561 --- buildroot/share/PlatformIO/scripts/preprocessor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/preprocessor.py b/buildroot/share/PlatformIO/scripts/preprocessor.py index 5355fa4e92..bda00dfd27 100644 --- a/buildroot/share/PlatformIO/scripts/preprocessor.py +++ b/buildroot/share/PlatformIO/scripts/preprocessor.py @@ -87,7 +87,7 @@ def search_compiler(env): if ppath.match(env['PROJECT_PACKAGES_DIR'] + "/**/bin"): for gpath in ppath.glob(gcc_exe): # Skip '*-elf-g++' (crosstool-NG) except for xtensa32 - if not "xtensa32" not in str(gpath) and gpath.stem.endswith('-elf-g++'): + if not gpath.stem.endswith('-elf-g++') or "xtensa32" in str(gpath): gccpath = str(gpath.resolve()) break @@ -95,7 +95,7 @@ def search_compiler(env): for ppath in envpath: for gpath in ppath.glob(gcc_exe): # Skip macOS Clang - if gpath != 'usr/bin/g++' or env['PLATFORM'] != 'darwin': + if not (gpath == 'usr/bin/g++' and env['PLATFORM'] == 'darwin'): gccpath = str(gpath.resolve()) break