From 60c5ff5b984136fc7c883ac572df6a5750dbc227 Mon Sep 17 00:00:00 2001 From: wxiat Date: Fri, 21 Jul 2023 10:12:00 +0800 Subject: [PATCH] add sw Signed-off-by: wxiat --- mariadb-connector-c-add-sw.patch | 35 ++++++++++++++++++++++++++++++++ mariadb-connector-c.spec | 8 +++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 mariadb-connector-c-add-sw.patch diff --git a/mariadb-connector-c-add-sw.patch b/mariadb-connector-c-add-sw.patch new file mode 100644 index 0000000..b72fc96 --- /dev/null +++ b/mariadb-connector-c-add-sw.patch @@ -0,0 +1,35 @@ +From 5057d59c27ae0a45824802d2b6d89eaa96202dd0 Mon Sep 17 00:00:00 2001 +From: wxiat +Date: Fri, 21 Jul 2023 10:03:47 +0800 +Subject: [PATCH] add sw + +Signed-off-by: wxiat +--- + include/ma_global.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/include/ma_global.h b/include/ma_global.h +index e8ca7df..13a3be2 100644 +--- a/include/ma_global.h ++++ b/include/ma_global.h +@@ -118,6 +118,17 @@ + #define FIX_GCC_LINKING_PROBLEM + #endif + ++/* egcs 1.1.2 has a problem with memcpy on Sw_64 */ ++#if defined(__GNUC__) && defined(__sw_64__) && ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) ++#define BAD_MEMCPY ++#endif ++ ++/* In Linux-sw_64 we have atomic.h if we are using gcc */ ++#if defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && defined(__sw_64__) && (__GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95)) && !defined(HAVE_ATOMIC_ADD) ++#define HAVE_ATOMIC_ADD ++#define HAVE_ATOMIC_SUB ++#endif ++ + /* egcs 1.1.2 has a problem with memcpy on Alpha */ + #if defined(__GNUC__) && defined(__alpha__) && ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) + #define BAD_MEMCPY +-- +2.31.1 + diff --git a/mariadb-connector-c.spec b/mariadb-connector-c.spec index f16e77a..5eefd99 100644 --- a/mariadb-connector-c.spec +++ b/mariadb-connector-c.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # For deep debugging we need to build binaries with extra debug info %bcond_with debug # Enable building and packing of the testsuite @@ -15,7 +16,7 @@ Name: mariadb-connector-c Version: 3.2.6 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 1%{?with_debug:.debug}%{anolis_release}%{?dist} Summary: The MariaDB Native Client library (C driver) License: LGPLv2+ Source: https://downloads.mariadb.org/interstitial/connector-c-%{version}/%{name}-%{version}-src.tar.gz @@ -27,6 +28,7 @@ Url: http://mariadb.org/ %if %{with testsuite} Patch1: testsuite.patch %endif +Patch2: mariadb-connector-c-add-sw.patch Requires: %{_sysconfdir}/my.cnf BuildRequires: gcc-c++ cmake openssl-devel zlib-devel @@ -96,6 +98,7 @@ and require this package, so the /etc/my.cnf file is present. %if %{with testsuite} %patch1 -p1 %endif +%patch2 -p1 # Remove unsused parts rm -r win win-iconv zlib @@ -250,6 +253,9 @@ popd # Need to ensure, that the testsuite will also run properly on 'fedpkg local' buid, not damaging the host machine %changelog +* Fri Jul 21 2023 wxiat - 3.2.6-1.0.1 +- add sw arch + * Wed Feb 16 2022 Michal Schorm - 3.2.6-1 - Rebase to 3.2.6 - Introduction of a new '*-doc' subpackage -- Gitee