Browse Source

🔨 Fix ESP32 build (for xtensa32) (2) (#27570)

Followup to #27561
ellensp 3 months ago
parent
commit
a365163ff0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      buildroot/share/PlatformIO/scripts/preprocessor.py

+ 2 - 2
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