From: <sv...@op...> - 2024-07-14 16:57:10
|
Author: manx Date: Sun Jul 14 18:56:57 2024 New Revision: 21180 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21180 Log: Merged revision(s) 21179 from trunk/OpenMPT: [Fix] build: Autotools: Work-around for <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115049> in Autotools by setting -fno-ipa-ra for all compilers that support this option. This is overly pessimistic, but we have no easy way to check for a specific compiler here, and this is necessary for GCC 8 or earlier which we still support and where we cannot use #pragma GCC optimize. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/build/autotools/configure.ac Modified: branches/OpenMPT-1.31/build/autotools/configure.ac ============================================================================== --- branches/OpenMPT-1.31/build/autotools/configure.ac Sun Jul 14 18:56:24 2024 (r21179) +++ branches/OpenMPT-1.31/build/autotools/configure.ac Sun Jul 14 18:56:57 2024 (r21180) @@ -54,6 +54,18 @@ [] ) +# work-around <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115049> +# This is somewhat pessimistic, but necessary for GCC 8 or earlier, +# which we still support and where we cannot use #pragma GCC optimize. +AC_LANG_PUSH([C]) +AX_CHECK_COMPILE_FLAG([-fno-ipa-ra], [CFLAGS="$CFLAGS -fno-ipa-ra"]) +AX_CFLAGS_WARN_ALL +AC_LANG_POP([C]) +AC_LANG_PUSH([C++]) +AX_CHECK_COMPILE_FLAG([-fno-ipa-ra], [CXXFLAGS="$CXXFLAGS -fno-ipa-ra"]) +AX_CXXFLAGS_WARN_ALL +AC_LANG_POP([C++]) + LIBOPENMPT_LTVER_CURRENT=!!MPT_LIBOPENMPT_LTVER_CURRENT!! LIBOPENMPT_LTVER_REVISION=!!MPT_LIBOPENMPT_LTVER_REVISION!! |