diff -Nru percona-xtradb-cluster-5.6-5.6.34-26.19/debian/changelog percona-xtradb-cluster-5.6-5.6.34-26.19/debian/changelog --- percona-xtradb-cluster-5.6-5.6.34-26.19/debian/changelog 2017-07-30 22:50:08.000000000 -0400 +++ percona-xtradb-cluster-5.6-5.6.34-26.19/debian/changelog 2017-10-04 15:02:39.000000000 -0300 @@ -1,3 +1,18 @@ +percona-xtradb-cluster-5.6 (5.6.34-26.19-0ubuntu3) artful; urgency=high + + * d/p/ibuf-uses-full-memory-barrier-ppc64.patch: This patch implements + a full memory barrier for InnoDB mutex entry/exit on PowerPC. + (LP: #1657256). + + * d/p/weak-memory-compat.patch: Removed as is already covered by the + newer patch. + + * d/p/ignore-gcc-warnings.patch: Fixes FTBFS on + artful by enabling -fpermissive and disabling the -Werror/-Wextra flags when compiling + Fixes (LP: #1714554). + + -- Jorge Niedbalski Wed, 04 Oct 2017 14:16:44 -0300 + percona-xtradb-cluster-5.6 (5.6.34-26.19-0ubuntu2) artful; urgency=medium * No-change rebuild against libevent-2.1-6 diff -Nru percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/ibuf-mutex-use-full-memory-barrier-powerpc.patch percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/ibuf-mutex-use-full-memory-barrier-powerpc.patch --- percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/ibuf-mutex-use-full-memory-barrier-powerpc.patch 1969-12-31 21:00:00.000000000 -0300 +++ percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/ibuf-mutex-use-full-memory-barrier-powerpc.patch 2017-10-04 14:30:08.000000000 -0300 @@ -0,0 +1,331 @@ +Description: This patch is a combination of different upstream MariaDB +patches for fixing the behavior of memory barriers when acquiring and +releasing mutexes on PowerPC machines. + +* Commit 6ea41f1e84eb6b864cac17ad0b862bde9820dc33: Implements +the os_fast_mutex(unlock_full_barrier/trylock_full_barrier) which +implies a full memory barrier. + +It also implements the os_mb OS memory barrier primitives for the +different architectures which is guaranteed to act as +full acquire-release barrier. + +* Commit 5ad02062d928cccbd29c0a2db6f0f7ceb33195d1: Based on the +previous commit, it adds a memory barrier on the mutex_exit +to prevent reading the number of waiters before releasing the lock, +this is completed with a modification on mutex_set_waiters that adds +a os_mb to make sure waiters store won't pass over mutex_test_and_set. + +* Commit 40497577ffd9f85557b15e08ad913f627b2e9530: The ib mutex set_and_test +function and acquires the lock by calling the os_atomic_test_and_set_byte_acquire +method which should be safe in PowerPC, at the same time the mutex unlock method +will call the os_atomic_test_and_set_byte_release which is implemented as a +__sync_lock_release + a __sync_synchronize call in PowerPC. + +Bug-Ubuntu: https://launchpad.net/bugs/1657256 +Reviewed-By: Jorge Niedbalski + +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/storage/innobase/include/os0sync.h ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/storage/innobase/include/os0sync.h +@@ -393,12 +393,32 @@ pfs_os_fast_mutex_unlock( + #endif /* UNIV_PFS_MUTEX */ + + /**********************************************************//** ++Acquires ownership of a fast mutex. Implies a full memory barrier even on ++platforms such as PowerPC where this is not normally required. ++@return 0 if success, != 0 if was reserved by another thread */ ++UNIV_INLINE ++ulint ++os_fast_mutex_trylock_full_barrier( ++/*==================*/ ++ os_fast_mutex_t* fast_mutex); /*!< in: mutex to acquire */ ++/**********************************************************//** ++ + Releases ownership of a fast mutex. */ + UNIV_INTERN + void + os_fast_mutex_unlock_func( + /*======================*/ + fast_mutex_t* fast_mutex); /*!< in: mutex to release */ ++ ++/**********************************************************//** ++Releases ownership of a fast mutex. Implies a full memory barrier even on ++platforms such as PowerPC where this is not normally required. */ ++UNIV_INTERN ++void ++os_fast_mutex_unlock_full_barrier( ++/*=================*/ ++ os_fast_mutex_t* fast_mutex); /*!< in: mutex to release */ ++ + /*********************************************************//** + Initializes an operating system fast mutex semaphore. */ + UNIV_INTERN +@@ -500,7 +520,7 @@ amount to decrement. */ + # define os_atomic_decrement_uint64(ptr, amount) \ + os_atomic_decrement(ptr, amount) + +-# if defined(IB_STRONG_MEMORY_MODEL) ++# if defined(HAVE_ATOMIC_BUILTINS) + + /** Do an atomic test and set. + @param[in,out] ptr Memory location to set to non-zero +@@ -514,19 +534,13 @@ os_atomic_test_and_set(volatile lock_wor + + /** Do an atomic release. + +-In theory __sync_lock_release should be used to release the lock. +-Unfortunately, it does not work properly alone. The workaround is +-that more conservative __sync_lock_test_and_set is used instead. +- +-Performance regression was observed at some conditions for Intel +-architecture. Disable release barrier on Intel architecture for now. + @param[in,out] ptr Memory location to write to + @return the previous value */ + inline +-lock_word_t ++void + os_atomic_clear(volatile lock_word_t* ptr) + { +- return(__sync_lock_test_and_set(ptr, 0)); ++ __sync_lock_release(ptr); + } + + # elif defined(HAVE_IB_GCC_ATOMIC_TEST_AND_SET) +@@ -556,6 +570,29 @@ os_atomic_clear(volatile lock_word_t* pt + + # endif /* HAVE_IB_GCC_ATOMIC_TEST_AND_SET */ + ++#if defined(__powerpc__) || defined(__aarch64__) ++/* ++ os_atomic_test_and_set_byte_release() should imply a release barrier before ++ setting, and a full barrier after. But __sync_lock_test_and_set() is only ++ documented as an aquire barrier. So on PowerPC we need to add the full ++ barrier explicitly. */ ++# define os_atomic_test_and_set_byte_release(ptr, new_val) \ ++ do { __sync_lock_release(ptr); \ ++ __sync_synchronize(); } while (0) ++#else ++/* ++ On x86, __sync_lock_test_and_set() happens to be full barrier, due to ++ LOCK prefix. ++*/ ++# define os_atomic_test_and_set_byte_release(ptr, new_val) \ ++ __sync_lock_test_and_set(ptr, (byte) new_val) ++#endif ++/* ++ os_atomic_test_and_set_byte_acquire() is a full memory barrier on x86. But ++ in general, just an aquire barrier should be sufficient. */ ++# define os_atomic_test_and_set_byte_acquire(ptr, new_val) \ ++ __sync_lock_test_and_set(ptr, (byte) new_val) ++ + #elif defined(HAVE_IB_SOLARIS_ATOMICS) + + # define HAVE_ATOMIC_BUILTINS +@@ -810,6 +847,9 @@ os_atomic_clear(volatile lock_word_t* pt + return(InterlockedExchange(ptr, 0)); + } + ++# define os_atomic_lock_release_byte(ptr) \ ++ (void) InterlockedExchange(ptr, 0) ++ + #else + # define IB_ATOMICS_STARTUP_MSG \ + "Mutexes and rw_locks use InnoDB's own implementation" +@@ -863,12 +903,14 @@ for synchronization */ + architecture. Disable memory barrier for Intel architecture for now. */ + # define os_rmb + # define os_wmb ++# define os_mb + # define IB_MEMORY_BARRIER_STARTUP_MSG \ + "Memory barrier is not used" + #elif defined(HAVE_IB_GCC_ATOMIC_THREAD_FENCE) + # define HAVE_MEMORY_BARRIER + # define os_rmb __atomic_thread_fence(__ATOMIC_ACQUIRE) + # define os_wmb __atomic_thread_fence(__ATOMIC_RELEASE) ++# define os_mb __atomic_thread_fence(__ATOMIC_SEQ_CST) + # define IB_MEMORY_BARRIER_STARTUP_MSG \ + "GCC builtin __atomic_thread_fence() is used for memory barrier" + +@@ -876,6 +918,7 @@ architecture. Disable memory barrier for + # define HAVE_MEMORY_BARRIER + # define os_rmb __sync_synchronize() + # define os_wmb __sync_synchronize() ++# define os_mb __sync_synchronize() + # define IB_MEMORY_BARRIER_STARTUP_MSG \ + "GCC builtin __sync_synchronize() is used for memory barrier" + +@@ -884,6 +927,7 @@ architecture. Disable memory barrier for + # include + # define os_rmb __machine_r_barrier() + # define os_wmb __machine_w_barrier() ++# define os_mb __machine_rw_barrier() + # define IB_MEMORY_BARRIER_STARTUP_MSG \ + "Solaris memory ordering functions are used for memory barrier" + +@@ -892,12 +936,14 @@ architecture. Disable memory barrier for + # include + # define os_rmb _mm_lfence() + # define os_wmb _mm_sfence() ++# define os_mb _mm_mfence() + # define IB_MEMORY_BARRIER_STARTUP_MSG \ + "_mm_lfence() and _mm_sfence() are used for memory barrier" + + #else + # define os_rmb + # define os_wmb ++# define os_mb do { } while(0) + # define IB_MEMORY_BARRIER_STARTUP_MSG \ + "Memory barrier is not used" + #endif +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/storage/innobase/include/os0sync.ic ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/storage/innobase/include/os0sync.ic +@@ -232,3 +232,34 @@ win_cmp_and_xchg_dword( + + #endif /* HAVE_WINDOWS_ATOMICS */ + ++/**********************************************************//** ++Acquires ownership of a fast mutex. Implies a full memory barrier even on ++platforms such as PowerPC where this is not normally required. ++@return 0 if success, != 0 if was reserved by another thread */ ++UNIV_INLINE ++ulint ++os_fast_mutex_trylock_full_barrier( ++/*==================*/ ++ os_fast_mutex_t* fast_mutex) /*!< in: mutex to acquire */ ++{ ++#ifdef __WIN__ ++ if (TryEnterCriticalSection(&fast_mutex->mutex)) { ++ ++ return(0); ++ } else { ++ ++ return(1); ++ } ++#else ++ /* NOTE that the MySQL my_pthread.h redefines pthread_mutex_trylock ++ so that it returns 0 on success. In the operating system ++ libraries, HP-UX-10.20 follows the old Posix 1003.4a Draft 4 and ++ returns 1 on success (but MySQL remaps that to 0), while Linux, ++ FreeBSD, Solaris, AIX, Tru64 Unix, HP-UX-11.0 return 0 on success. */ ++ ++#ifdef __powerpc__ ++ os_mb; ++#endif ++ return((ulint) pthread_mutex_trylock(&fast_mutex->mutex)); ++#endif ++} +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/storage/innobase/include/sync0sync.ic ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/storage/innobase/include/sync0sync.ic +@@ -83,19 +83,17 @@ ib_mutex_test_and_set( + ib_mutex_t* mutex) /*!< in: mutex */ + { + #if defined(HAVE_ATOMIC_BUILTINS) +- return(os_atomic_test_and_set(&mutex->lock_word)); ++ return(os_atomic_test_and_set_byte_acquire(&mutex->lock_word, 1)); + #else + ibool ret; + +- ret = os_fast_mutex_trylock(&(mutex->os_fast_mutex)); ++ ret = os_fast_mutex_trylock_full_barrier(&(mutex->os_fast_mutex)); + + if (ret == 0) { + /* We check that os_fast_mutex_trylock does not leak + and allow race conditions */ + ut_a(mutex->lock_word == 0); +- + mutex->lock_word = 1; +- os_wmb; + } + + return((byte) ret); +@@ -112,11 +110,11 @@ mutex_reset_lock_word( + ib_mutex_t* mutex) /*!< in: mutex */ + { + #if defined(HAVE_ATOMIC_BUILTINS) +- os_atomic_clear(&mutex->lock_word); ++ os_atomic_test_and_set_byte_release(&mutex->lock_word, 0); + #else + mutex->lock_word = 0; + +- os_fast_mutex_unlock(&(mutex->os_fast_mutex)); ++ os_fast_mutex_unlock_full_barrier(&(mutex->os_fast_mutex)); + #endif /* HAVE_ATOMIC_BUILTINS */ + } + +@@ -182,6 +180,10 @@ mutex_exit_func( + to wake up possible hanging threads if + they are missed in mutex_signal_object. */ + ++ /* We add a memory barrier to prevent reading of the ++ number of waiters before releasing the lock. */ ++ os_mb; ++ + if (mutex_get_waiters(mutex) != 0) { + + mutex_signal_object(mutex); +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/storage/innobase/os/os0sync.cc ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/storage/innobase/os/os0sync.cc +@@ -724,6 +724,26 @@ os_fast_mutex_unlock_func( + } + + /**********************************************************//** ++Releases ownership of a fast mutex. Implies a full memory barrier even on ++platforms such as PowerPC where this is not normally required. */ ++UNIV_INTERN ++void ++os_fast_mutex_unlock_full_barrier( ++/*=================*/ ++ os_fast_mutex_t* fast_mutex) /*!< in: mutex to release */ ++{ ++#ifdef __WIN__ ++ LeaveCriticalSection(&fast_mutex->mutex); ++#else ++ pthread_mutex_unlock(&fast_mutex->mutex); ++#ifdef __powerpc__ ++ os_mb; ++#endif ++#endif ++} ++ ++ ++/**********************************************************//** + Frees a mutex object. */ + UNIV_INTERN + void +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/storage/innobase/sync/sync0sync.cc ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/storage/innobase/sync/sync0sync.cc +@@ -30,6 +30,7 @@ Mutex, the basic synchronization primiti + Created 9/5/1995 Heikki Tuuri + *******************************************************/ + ++#include "os0sync.h" /* for HAVE_ATOMIC_BUILTINS */ + #include "sync0sync.h" + #ifdef UNIV_NONINL + #include "sync0sync.ic" +@@ -41,7 +42,6 @@ Created 9/5/1995 Heikki Tuuri + #include "srv0srv.h" + #include "btr0types.h" + #include "buf0types.h" +-#include "os0sync.h" /* for HAVE_ATOMIC_BUILTINS */ + #ifdef UNIV_SYNC_DEBUG + # include "srv0start.h" /* srv_is_being_started */ + #endif /* UNIV_SYNC_DEBUG */ +@@ -526,7 +526,6 @@ mutex_set_waiters( + + *ptr = n; /* Here we assume that the write of a single + word in memory is atomic */ +- os_wmb; + } + + /******************************************************************//** +@@ -636,6 +635,10 @@ spin_loop: + mutex_set_waiters(mutex, 1); + } + ++/* Make sure waiters store won't pass over mutex_test_and_set */ ++#if defined(__powerpc__) ++ os_mb; ++#endif + /* Try to reserve still a few times */ + for (i = 0; i < 4; i++) { + if (ib_mutex_test_and_set(mutex) == 0) { diff -Nru percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/ignore-gcc-warnings.patch percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/ignore-gcc-warnings.patch --- percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/ignore-gcc-warnings.patch 1969-12-31 21:00:00.000000000 -0300 +++ percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/ignore-gcc-warnings.patch 2017-10-04 15:02:02.000000000 -0300 @@ -0,0 +1,136 @@ +Description: This patch enables -fpermissive and +disables the -Werror and -Wextra flags for CXX_FLAGS and C_FLAGS +this allows the compilation to succeed and fixes (LP: #1714554). + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/percona-xtradb-cluster-5.5/+bug/1657256 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/percona-xtradb-cluster-5.6/+bug/1714554 +Reviewed-By: Jorge Niedbalski + +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/cmake/build_configurations/compiler_options.cmake ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/cmake/build_configurations/compiler_options.cmake +@@ -34,7 +34,7 @@ IF(UNIX) + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}") + ENDIF() + IF(CMAKE_COMPILER_IS_GNUCXX) +- SET(COMMON_CXX_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing") ++ SET(COMMON_CXX_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -fpermissive") + # Disable inline optimizations for valgrind testing to avoid false positives + IF(WITH_VALGRIND) + SET(COMMON_CXX_FLAGS "-fno-inline ${COMMON_CXX_FLAGS}") +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/BUILD/SETUP.sh ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/BUILD/SETUP.sh +@@ -122,7 +122,7 @@ elif [ "x$warning_mode" = "xmaintainer" + debug_extra_cflags="-g3" + else + # Both C and C++ warnings +- warnings="-Wall -Wextra -Wunused -Wwrite-strings" ++ warnings="" + + # For more warnings, uncomment the following line + # warnings="$warnings -Wshadow" +--- percona-xtradb-cluster-5.6-5.6.34-26.19/cmake/maintainer.cmake ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/cmake/maintainer.cmake +@@ -14,7 +14,7 @@ + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + # Common warning flags for GCC, G++, Clang and Clang++ +-SET(MY_WARNING_FLAGS "-Wall -Wextra -Wformat-security") ++SET(MY_WARNING_FLAGS "") + MY_CHECK_C_COMPILER_FLAG("-Wvla" HAVE_WVLA) # Requires GCC 4.3+ or Clang + IF(HAVE_WVLA) + SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wvla") +@@ -36,8 +36,8 @@ + + # Turn on Werror (warning => error) when using maintainer mode. + IF(MYSQL_MAINTAINER_MODE) +- SET(MY_C_WARNING_FLAGS "${MY_C_WARNING_FLAGS} -Werror") +- SET(MY_CXX_WARNING_FLAGS "${MY_CXX_WARNING_FLAGS} -Werror") ++ SET(MY_C_WARNING_FLAGS "${MY_C_WARNING_FLAGS} ") ++ SET(MY_CXX_WARNING_FLAGS "${MY_CXX_WARNING_FLAGS} ") + SET(COMPILE_FLAG_WERROR 1) + ENDIF() + +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/cmake/libutils.cmake ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/cmake/libutils.cmake +@@ -291,7 +291,7 @@ ENDFUNCTION() + # other libraries like openssl. + FUNCTION(RESTRICT_SYMBOL_EXPORTS target) + IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX) +- SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror") ++ SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") + CHECK_C_COMPILER_FLAG("-fvisibility=hidden" HAVE_VISIBILITY_HIDDEN) + IF(HAVE_VISIBILITY_HIDDEN) + MESSAGE(STATUS "HAVE_VISIBILITY_HIDDEN") +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/codership-debian/tests/build ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/codership-debian/tests/build +@@ -28,7 +28,7 @@ int main() + EOF + + echo "building..." +-gcc -o libmysqltest libmysqltest.c `/usr/bin/mysql_config --cflags --libs` -Wall -Werror ++gcc -o libmysqltest libmysqltest.c `/usr/bin/mysql_config --cflags --libs` + echo "build: OK" + [ -x libmysqltest ] + ./libmysqltest +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/configure.cmake ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/configure.cmake +@@ -440,7 +440,7 @@ FIND_PACKAGE (Threads) + FUNCTION(MY_CHECK_PTHREAD_ONCE_INIT) + CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR_FLAG) + IF(HAVE_WERROR_FLAG) +- SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror") ++ SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") + ENDIF() + CHECK_C_SOURCE_COMPILES(" + #include +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/libevent/configure.in ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/libevent/configure.in +@@ -365,7 +365,7 @@ if test x$enable_gcc_warnings = xyes; th + #error + #endif]), have_gcc42=yes, have_gcc42=no) + +- CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror" ++ CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum" + CFLAGS="$CFLAGS -Wno-unused-parameter -Wno-sign-compare -Wstrict-aliasing" + + if test x$have_gcc4 = xyes ; then +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/plugin/HandlerSocket-Plugin-for-MySQL/configure.ac ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/plugin/HandlerSocket-Plugin-for-MySQL/configure.ac +@@ -4,7 +4,7 @@ + #AC_PREREQ([2.63b]) + AC_INIT([handlersocket-plugin], [1.1.1], [https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL/issues]) + AC_CONFIG_HEADERS([config.h]) +-AM_INIT_AUTOMAKE([-Wall -Werror foreign]) ++AM_INIT_AUTOMAKE([foreign]) + AC_CONFIG_SRCDIR([libhsclient/fatal.cpp]) + AC_CONFIG_MACRO_DIR([m4]) + +@@ -136,8 +136,8 @@ if test "$enable_handlersocket_server" ! + fi + AC_SUBST(HANDLERSOCKET_SUBDIRS) + +-CFLAGS="$CFLAGS -Werror" +-CXXFLAGS="$CXXFLAGS -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC" ++CFLAGS="$CFLAGS" ++CXXFLAGS="$CXXFLAGS -g -fno-rtti -fno-exceptions -fPIC -DPIC" + + AC_CONFIG_FILES([Makefile + handlersocket/Makefile +--- percona-xtradb-cluster-5.6-5.6.34-26.19.orig/scripts/CMakeLists.txt ++++ percona-xtradb-cluster-5.6-5.6.34-26.19/scripts/CMakeLists.txt +@@ -109,6 +109,7 @@ STRING(REGEX REPLACE "--param=[-=a-z0-9] + STRING(REGEX REPLACE "-specs=[-A-Za-z0-9/]*" "" CFLAGS "${CFLAGS}") + STRING(REGEX REPLACE "-DMY_PTHREAD_FASTMUTEX[=0-9]*" "" CFLAGS "${CFLAGS}") + STRING(REGEX REPLACE "-Werror=[-A-Za-z]*" "" CFLAGS "${CFLAGS}") ++STRING(REGEX REPLACE "-Werror( |$)" "" CFLAGS "${CFLAGS}") + STRING(REGEX REPLACE "-Wp,[-=_A-Za-z0-9]*" "" CFLAGS "${CFLAGS}") + STRING(REPLACE "-fstack-protector-strong" "" CFLAGS "${CFLAGS}") + STRING(REPLACE "-grecord-gcc-switches" "" CFLAGS "${CFLAGS}") +@@ -119,6 +120,7 @@ STRING(REGEX REPLACE "--param=[-=a-z0-9] + STRING(REGEX REPLACE "-specs=[-A-Za-z0-9/]*" "" CXXFLAGS "${CXXFLAGS}") + STRING(REGEX REPLACE "-DMY_PTHREAD_FASTMUTEX[=0-9]*" "" CXXFLAGS "${CXXFLAGS}") + STRING(REGEX REPLACE "-Werror=[-A-Za-z]*" "" CXXFLAGS "${CXXFLAGS}") ++STRING(REGEX REPLACE "-Werror( |$)" "" CXXFLAGS "${CXXFLAGS}") + STRING(REGEX REPLACE "-Wp,[-=_A-Za-z0-9]*" "" CXXFLAGS "${CXXFLAGS}") + STRING(REPLACE "-fstack-protector-strong" "" CXXFLAGS "${CXXFLAGS}") + STRING(REPLACE "-grecord-gcc-switches" "" CXXFLAGS "${CXXFLAGS}") diff -Nru percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/series percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/series --- percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/series 2017-03-03 06:41:02.000000000 -0300 +++ percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/series 2017-10-04 14:56:24.000000000 -0300 @@ -1,3 +1,4 @@ +ignore-gcc-warnings.patch scripts__mysqld_safe.sh__signals.patch fix_tc_log_initialization_on_ppc64.patch -weak-memory-compat.patch +ibuf-mutex-use-full-memory-barrier-powerpc.patch diff -Nru percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/weak-memory-compat.patch percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/weak-memory-compat.patch --- percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/weak-memory-compat.patch 2017-03-03 06:41:02.000000000 -0300 +++ percona-xtradb-cluster-5.6-5.6.34-26.19/debian/patches/weak-memory-compat.patch 1969-12-31 21:00:00.000000000 -0300 @@ -1,23 +0,0 @@ -From f31a89191f6b1679d9f8b584aa95fe006182ee7d Mon Sep 17 00:00:00 2001 -From: Sergey Vojtovich -Date: Wed, 18 Nov 2015 15:51:20 +0400 -Subject: [PATCH] MDEV-9128 - Compiling on IBM System Z fails - -Provided IBM System Z have outdated compiler version, which supports gcc sync -builtins but not gcc atomic builtins. It also has weak memory model. - -InnoDB attempted to verify if __sync_lock_test_and_set() is available by -checking IB_STRONG_MEMORY_MODEL. This macro has nothing to do with availability -of __sync_lock_test_and_set(), the right one is HAVE_ATOMIC_BUILTINS. - ---- a/storage/innobase/include/os0sync.h -+++ b/storage/innobase/include/os0sync.h -@@ -500,7 +500,7 @@ amount to decrement. */ - # define os_atomic_decrement_uint64(ptr, amount) \ - os_atomic_decrement(ptr, amount) - --# if defined(IB_STRONG_MEMORY_MODEL) -+# if defined(HAVE_ATOMIC_BUILTINS) - - /** Do an atomic test and set. - @param[in,out] ptr Memory location to set to non-zero