From: <sv...@op...> - 2024-07-14 16:56:36
|
Author: manx Date: Sun Jul 14 18:56:24 2024 New Revision: 21179 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21179 Log: [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: trunk/OpenMPT/build/autotools/configure.ac Modified: trunk/OpenMPT/build/autotools/configure.ac ============================================================================== --- trunk/OpenMPT/build/autotools/configure.ac Sun Jul 14 18:53:54 2024 (r21178) +++ trunk/OpenMPT/build/autotools/configure.ac Sun Jul 14 18:56:24 2024 (r21179) @@ -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!! |