mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-10-01 23:39:36 +00:00
mongodb: Fix aarch64 build with gcc12
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
c4f3039744
commit
2e0f15d3f4
@ -0,0 +1,37 @@
|
|||||||
|
From 5c9e0d0fc9188bab0ae09c9c33df01938b0c1b6c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Thu, 14 Apr 2022 09:25:33 -0700
|
||||||
|
Subject: [PATCH] server: Adjust the cache alignment assumptions
|
||||||
|
|
||||||
|
aarch64 has 256 for hardware_destructive_interference_size and gcc 12
|
||||||
|
has added a warning to complain about mismatches which results in
|
||||||
|
static_assert failures
|
||||||
|
|
||||||
|
In file included from src/mongo/s/commands/cluster_find_cmd.cpp:39:
|
||||||
|
src/mongo/db/stats/counters.h:185:47: error: static assertion failed: cache line spill
|
||||||
|
185 | static_assert(sizeof(decltype(_together)) <= stdx::hardware_constructive_interference_size,
|
||||||
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The structure need to ensure true sharing for both the elements
|
||||||
|
so align it to hardware_constructive_interference_size instead
|
||||||
|
|
||||||
|
Upstream-Status: Reported [https://jira.mongodb.org/browse/SERVER-65664]
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
src/mongo/db/stats/counters.h | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- a/src/mongo/db/stats/counters.h
|
||||||
|
+++ b/src/mongo/db/stats/counters.h
|
||||||
|
@@ -182,8 +182,8 @@ private:
|
||||||
|
AtomicWord<long long> requests{0};
|
||||||
|
};
|
||||||
|
CacheAligned<Together> _together{};
|
||||||
|
- static_assert(sizeof(decltype(_together)) <= stdx::hardware_constructive_interference_size,
|
||||||
|
- "cache line spill");
|
||||||
|
+ static_assert(sizeof(Together) <= stdx::hardware_constructive_interference_size,
|
||||||
|
+ "cache line spill");
|
||||||
|
|
||||||
|
CacheAligned<AtomicWord<long long>> _logicalBytesOut{0};
|
||||||
|
|
||||||
@ -31,6 +31,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \
|
|||||||
file://ppc64_ARCH_BITS.patch \
|
file://ppc64_ARCH_BITS.patch \
|
||||||
file://PTHREAD_STACK_MIN.patch \
|
file://PTHREAD_STACK_MIN.patch \
|
||||||
file://0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch \
|
file://0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch \
|
||||||
|
file://0001-server-Adjust-the-cache-alignment-assumptions.patch \
|
||||||
"
|
"
|
||||||
SRC_URI:append:libc-musl ="\
|
SRC_URI:append:libc-musl ="\
|
||||||
file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \
|
file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user