]> TLD Linux GIT Repositories - packages/mysql.git/commitdiff
- merged protobuf 3.6 fix from PLD
authorMarcin Krol <hawk@tld-linux.org>
Mon, 22 Oct 2018 18:04:56 +0000 (18:04 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 22 Oct 2018 18:04:56 +0000 (18:04 +0000)
mysql-opt.patch
mysql.spec

index c1a82980f3a2d877bb7643623597dd8e053a59b7..eaa5c4e71b752237a11b9b65c1bad35eeb1b7a18 100644 (file)
  
    # Solaris flags
 
+--- percona-server-5.7.23-23/cmake/build_configurations/compiler_options.cmake.orig    2018-10-14 08:44:45.291573886 +0200
++++ percona-server-5.7.23-23/cmake/build_configurations/compiler_options.cmake 2018-10-14 08:44:55.181573772 +0200
+@@ -25,17 +25,17 @@
+   SET(64BIT 1)
+ ENDIF()
+-SET(CMAKE_CXX_STANDARD 98)
++SET(CMAKE_CXX_STANDARD 11)
+  
+ # Compiler options
+ IF(UNIX)  
+-  MY_CHECK_CXX_COMPILER_FLAG("-std=gnu++03" GNU03_SUPPORTED)
++  MY_CHECK_CXX_COMPILER_FLAG("-std=gnu++11" GNU11_SUPPORTED)
+-  IF(GNU03_SUPPORTED)
++  IF(GNU11_SUPPORTED)
+     IF(CMAKE_VERSION VERSION_LESS 3.1.0)
+-      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++03")
++      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+     ELSE()
+-      SET(CMAKE_CXX98_EXTENSION_COMPILE_OPTION -std=gnu++03)
++      SET(CMAKE_CXX11_EXTENSION_COMPILE_OPTION -std=gnu++11)
+     ENDIF()
+   ENDIF()
+@@ -140,7 +140,7 @@
+       SET(COMMON_C_FLAGS            "-g ${SUNPRO_FLAGS}")
+       SET(COMMON_CXX_FLAGS          "-g0 ${SUNPRO_FLAGS}")
+-      SET(COMMON_CXX_FLAGS          "${COMMON_CXX_FLAGS} -std=c++03")
++      SET(COMMON_CXX_FLAGS          "${COMMON_CXX_FLAGS} -std=c++11")
+       SET(CMAKE_C_FLAGS_DEBUG       "${COMMON_C_FLAGS}")
+       SET(CMAKE_CXX_FLAGS_DEBUG     "${COMMON_CXX_FLAGS}")
+       SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-xO3 ${COMMON_C_FLAGS}")
index fa030fd2c65c7042a19f04b59c22514a4625abc2..44f4dee85303cd9ea51951f7f44f06db8d81de46 100644 (file)
@@ -43,7 +43,7 @@
 %undefine      with_tokudb
 %endif
 
-%define                rel     2
+%define                rel     3
 %define                percona_rel     23
 %include       /usr/lib/rpm/macros.perl
 Summary:       MySQL: a very fast and reliable SQL database engine
@@ -518,13 +518,19 @@ cd build
 # (it defaults to first cluster but user may change it to whatever
 # cluster it wants)
 
+%if "%{cc_version}" >= "7.0"
+FALLTHROUGH_OPT="-Wimplicit-fallthrough=0"
+%else
+FALLTHROUGH_OPT=
+%endif
+
 CPPFLAGS="%{rpmcppflags}" \
 %cmake .. \
        -DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
-       -DCMAKE_C_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0" \
-       -DCMAKE_CXX_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0" \
-       -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0 -Wno-shadow" \
-       -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0 -Wno-shadow" \
+       -DCMAKE_C_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT" \
+       -DCMAKE_CXX_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT" \
+       -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT -Wno-shadow" \
+       -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT -Wno-shadow" \
        -DCOMPILATION_COMMENT="TLD Linux MySQL RPM" \
        -DCURSES_INCLUDE_PATH=/usr/include/ncurses \
        %{?with_systemtap:-DENABLE_DTRACE=ON} \