From: <sv...@op...> - 2024-07-14 16:10:47
|
Author: manx Date: Sun Jul 14 18:10:41 2024 New Revision: 21176 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21176 Log: Merged revision(s) 21174 from trunk/OpenMPT: [Reg] Disable work-around for <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115049> for GCC 9 or earlier becuase it gets confused and prduces a ton of warnings about mismatched optimization options when using #pragma GCC optimize with either "no-ip-ra" or even simply "O1". Let's just hope that the problem is way more unlikely to trigger in earlier GCC. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/common/BuildSettingsCompiler.h Modified: branches/OpenMPT-1.31/common/BuildSettingsCompiler.h ============================================================================== --- branches/OpenMPT-1.31/common/BuildSettingsCompiler.h Sun Jul 14 18:10:07 2024 (r21175) +++ branches/OpenMPT-1.31/common/BuildSettingsCompiler.h Sun Jul 14 18:10:41 2024 (r21176) @@ -46,7 +46,16 @@ #ifdef MPT_COMPILER_SETTING_QUIRK_GCC_NO_IPA_RA // See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115049>. +#if MPT_GCC_BEFORE(9, 0, 0) +// Earlier GCC get confused about setting a global function attribute. +// We need to check for 9.0 instead of 9.1 because of +// <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028580>. +// It also gets confused when setting global optimization -O1, +// so we have no way of fixing GCC 9 or earlier. +//#pragma GCC optimize("O1") +#else #pragma GCC optimize("no-ipa-ra") +#endif #endif // MPT_COMPILER_SETTING_QUIRK_GCC_NO_IPA_RA #endif // MPT_COMPILER_GCC |