From 32cf0de9665872d3725537374f0f4ed8cc6c6885 Mon Sep 17 00:00:00 2001 From: liushuai <770722922@qq.com> Date: Thu, 1 Sep 2022 01:09:57 +0800 Subject: [PATCH] Fix build support gcc8 for other arch --- examples/PlayMIDIFromSPIFFS/PlayMIDIFromSPIFFS.ino | 2 +- src/AudioGeneratorMIDI.cpp | 2 +- src/AudioGeneratorMIDI.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/PlayMIDIFromSPIFFS/PlayMIDIFromSPIFFS.ino b/examples/PlayMIDIFromSPIFFS/PlayMIDIFromSPIFFS.ino index 38e12d34..aefb26b1 100644 --- a/examples/PlayMIDIFromSPIFFS/PlayMIDIFromSPIFFS.ino +++ b/examples/PlayMIDIFromSPIFFS/PlayMIDIFromSPIFFS.ino @@ -2,7 +2,7 @@ // Do not build on GCC8, GCC8 has a compiler bug -#if defined(ARDUINO_ARCH_RP2040) || (__GNUC__ == 8) +#if defined(ARDUINO_ARCH_RP2040) || ((__GNUC__ == 8) && (__XTENSA__)) void setup() {} void loop() {} #else diff --git a/src/AudioGeneratorMIDI.cpp b/src/AudioGeneratorMIDI.cpp index 1bb1cd3f..63dca2f4 100644 --- a/src/AudioGeneratorMIDI.cpp +++ b/src/AudioGeneratorMIDI.cpp @@ -58,7 +58,7 @@ #include "AudioGeneratorMIDI.h" -#if __GNUC__ == 8 +#if (__GNUC__ == 8) && (__XTENSA__) // Do not build, GCC8 has a compiler bug #else // __GNUC__ == 8 diff --git a/src/AudioGeneratorMIDI.h b/src/AudioGeneratorMIDI.h index 96b2dd63..62ede5e7 100644 --- a/src/AudioGeneratorMIDI.h +++ b/src/AudioGeneratorMIDI.h @@ -21,7 +21,7 @@ #ifndef _AUDIOGENERATORMIDI_H #define _AUDIOGENERATORMIDI_H -#if __GNUC__ == 8 +#if (__GNUC__ == 8) && (__XTENSA__) // Do not build, GCC8 has a compiler bug #else // __GNUC__ == 8