diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-dbs')
5 files changed, 90 insertions, 4 deletions
diff --git a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc index 7c92bbaad6..e3ce297618 100644 --- a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -19,6 +19,7 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz file://clang_version_header_conflict.patch \ file://fix-arm-atomic.patch \ file://0001-Fix-library-LZ4-lookup.patch \ + file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ " SRC_URI[sha256sum] = "ff05dd69e9f6992caf1053242db704f04eda6f9accbcc98b74edfaf6013c45c4" diff --git a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch new file mode 100644 index 0000000000..0a2eed44f4 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch @@ -0,0 +1,37 @@ +From d611f78198dee64bb6a05933d200b544e2510b76 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 14 Nov 2020 14:37:13 -0800 +Subject: [PATCH] innobase: Define __NR_futex if it does not exist + +__NR_futex is not defines by newer architectures e.g. arc, riscv32 as +they only have 64bit variant of time_t. Glibc defines SYS_futex interface based +on +__NR_futex, since this is used in applications, such applications start +to fail to build for these newer architectures. This patch defines a +fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps +working + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + storage/innobase/log/log0sync.cc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/storage/innobase/log/log0sync.cc b/storage/innobase/log/log0sync.cc +index 7799e605..4fab8f74 100644 +--- a/storage/innobase/log/log0sync.cc ++++ b/storage/innobase/log/log0sync.cc +@@ -66,6 +66,9 @@ Note that if write operation is very fast, a) or b) can be fine as alternative. + #ifdef __linux__ + #include <linux/futex.h> + #include <sys/syscall.h> ++#if !defined(SYS_futex) && defined(SYS_futex_time64) ++# define SYS_futex SYS_futex_time64 ++#endif + #endif + + #include <atomic> +-- +2.29.2 + diff --git a/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc index 090e16f58e..a1665ab2b2 100644 --- a/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc @@ -36,7 +36,7 @@ LEAD_SONAME = "libpq.so" # LDFLAGS for shared libraries export LDFLAGS_SL = "${LDFLAGS}" -inherit autotools pkgconfig perlnative python3native useradd update-rc.d systemd gettext cpan-base +inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" diff --git a/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch b/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch new file mode 100644 index 0000000000..aa291daa3e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch @@ -0,0 +1,47 @@ +From ddcc8a9f7e0f0bfee96f2f0a0c10f21f9fa9b05d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 15 Nov 2020 15:02:28 -0800 +Subject: [PATCH] folly: Use SYS_futex for syscall + +glibc defines SYS_futex and on newer 32bit CPUs like RISCV-32, arc there +is no 32bit time_t therefore define SYS_futex in terms of SYS_futex_time64 + +Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7676] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + third-party/folly/folly/detail/Futex.cpp | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/third-party/folly/folly/detail/Futex.cpp b/third-party/folly/folly/detail/Futex.cpp +index 62d6ea2b2..a914a8c73 100644 +--- a/third-party/folly/folly/detail/Futex.cpp ++++ b/third-party/folly/folly/detail/Futex.cpp +@@ -48,9 +48,15 @@ namespace { + #define FUTEX_CLOCK_REALTIME 256 + #endif + ++/// Newer 32bit CPUs eg. RISCV-32 are defaulting to 64bit time_t from get go and ++/// therefore do not define __NR_futex ++#if !defined(SYS_futex) && defined(SYS_futex_time64) ++# define SYS_futex SYS_futex_time64 ++#endif ++ + int nativeFutexWake(const void* addr, int count, uint32_t wakeMask) { + long rv = syscall( +- __NR_futex, ++ SYS_futex, + addr, /* addr1 */ + FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG, /* op */ + count, /* val */ +@@ -112,7 +118,7 @@ FutexResult nativeFutexWaitImpl( + // Unlike FUTEX_WAIT, FUTEX_WAIT_BITSET requires an absolute timeout + // value - http://locklessinc.com/articles/futex_cheat_sheet/ + long rv = syscall( +- __NR_futex, ++ SYS_futex, + addr, /* addr1 */ + op, /* op */ + expected, /* val */ +-- +2.29.2 + diff --git a/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb index 7ebc5ab1da..117a16b9e8 100644 --- a/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +++ b/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb @@ -6,13 +6,14 @@ LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" -SRCREV = "48bfca38f6f175435052a59791922a1a453d9609" -SRCBRANCH = "6.11.fb" -PV = "6.11.4" +SRCREV = "f3e33549c151f30ac4eb7c22356c6d0331f37652" +SRCBRANCH = "6.12.fb" +PV = "6.12.7" SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ file://0001-cmake-Add-check-for-atomic-support.patch \ file://0001-cmake-Use-exported-target-for-bz2.patch \ + file://0001-folly-Use-SYS_futex-for-syscall.patch \ " S = "${WORKDIR}/git" |