Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21362

do something with -fno-builtin-memcmp for rem0cmp.cc

    XMLWordPrintable

Details

    Description

        IF (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR
            CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
          INCLUDE(CheckCXXCompilerFlag)
          CHECK_CXX_COMPILER_FLAG("-fno-builtin-memcmp" HAVE_NO_BUILTIN_MEMCMP)
          IF (HAVE_NO_BUILTIN_MEMCMP)
            # Work around http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
            SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/rem/rem0cmp.cc
      	PROPERTIES COMPILE_FLAGS -fno-builtin-memcmp)
          ENDIF()
        ENDIF()
      ENDIF()
      

      This was added to mitigate poor compiler optimization. As I can see, it was fixed in gcc-4.6 https://godbolt.org/z/7G64qo For 10.5 we support at least gcc-4.8 so this CMake code can be removed. For older versions it should be replaced with some preprocessor condition to check compiler name and version.

      Attachments

        Activity

          People

            kevg Eugene Kosov (Inactive)
            kevg Eugene Kosov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.