Commit 62139dc2 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-13656 10.3 does not build on CentOS 5 x86

Force -march=i686 (just like innodb used to do for years).

And disable query_response_time plugin, it fails to compile with

/mnt/server/plugin/query_response_time/query_response_time.cc:279: error: unable to find a register to spill in class ‘GENERAL_REGS’
/mnt/server/plugin/query_response_time/query_response_time.cc:279: error: this is the insn:
(insn:HI 70 69 71 9 /mnt/server/include/my_atomic.h:194 (parallel [
            (set (reg:DI 82)
                (mem/v:DI (plus:SI (reg/f:SI 79)
                        (reg:SI 78)) [-1 S8 A32]))
            (set (mem/v:DI (plus:SI (reg/f:SI 79)
                        (reg:SI 78)) [-1 S8 A32])
                (unspec_volatile:DI [
                        (mem/v:DI (plus:SI (reg/f:SI 79)
                                (reg:SI 78)) [-1 S8 A32])
                        (reg:DI 82)
                        (reg:SI 83)
                        (reg:SI 84)
                    ] 10))
            (set (reg:CCZ 17 flags)
                (compare:CCZ (unspec_volatile:DI [
                            (mem/v:DI (plus:SI (reg/f:SI 79)
                                    (reg:SI 78)) [-1 S8 A32])
                            (reg:DI 82)
                            (reg:SI 83)
                            (reg:SI 84)
                        ] 11)
                    (reg:DI 82)))
        ]) 1101 {*sync_double_compare_and_swap_ccdi_pic} (insn_list:REG_DEP_TRUE 68 (insn_list:REG_DEP_TRUE 69 (nil)))
    (expr_list:REG_DEAD (reg:SI 84)
        (expr_list:REG_DEAD (reg:SI 83)
            (nil))))
parent 1a503b27
......@@ -65,6 +65,14 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
ENDIF()
ENDIF()
# workaround for old gcc on x86, gcc atomic ops only work under -march=i686
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND
CMAKE_C_COMPILER_VERSION VERSION_LESS "4.4.0")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
SET(PLUGIN_QUERY_RESPONSE_TIME NO) # "error: unable to find a register to spill"
ENDIF()
IF(WITHOUT_DYNAMIC_PLUGINS)
MESSAGE("Dynamic plugins are disabled.")
ENDIF(WITHOUT_DYNAMIC_PLUGINS)
......
......@@ -156,13 +156,6 @@ IF(HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE)
ENDIF()
IF(NOT MSVC)
# workaround for old gcc on x86, gcc atomic ops only work under -march=i686
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND
CMAKE_C_COMPILER_VERSION VERSION_LESS "4.4.0")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
ENDIF()
# Only use futexes on Linux if GCC atomics are available
IF(NOT MSVC AND NOT CMAKE_CROSSCOMPILING)
CHECK_C_SOURCE_RUNS(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment