percona-xtrabackup/gcc-10-cflags-fix.patch
bzhaoop c9e724ccb6 Fix gcc 10 compling issue
Fix the issue via specify "-fcommon" in C_flags.
Due to gcc 10 will disable the said option defaultly.
2021-08-02 13:34:46 +08:00

13 lines
1.1 KiB
Diff

diff -ruNa percona-xtrabackup-percona-xtrabackup-2.3.6/cmake/build_configurations/compiler_options.cmake percona-xtrabackup-percona-xtrabackup-2.3.6_patched/cmake/build_configurations/compiler_options.cmake
--- percona-xtrabackup-percona-xtrabackup-2.3.6/cmake/build_configurations/compiler_options.cmake 2021-08-02 10:04:35.684407534 +0800
+++ percona-xtrabackup-percona-xtrabackup-2.3.6_patched/cmake/build_configurations/compiler_options.cmake 2021-08-02 10:05:25.068932898 +0800
@@ -25,7 +25,7 @@
# Default GCC flags
IF(CMAKE_COMPILER_IS_GNUCC)
- SET(COMMON_C_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -Wno-implicit-fallthrough -Wno-stringop-truncation -Wno-stringop-overflow")
+ SET(COMMON_C_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -Wno-implicit-fallthrough -Wno-stringop-truncation -Wno-stringop-overflow -fcommon")
# Disable inline optimizations for valgrind testing to avoid false positives
IF(WITH_VALGRIND)
SET(COMMON_C_FLAGS "-fno-inline ${COMMON_C_FLAGS}")