cmake: add support python 3.10
This commit is contained in:
parent
2f5d703079
commit
00a0c4d666
@ -1,12 +1,13 @@
|
||||
From cd42039f86055090db6c4ad5f8a8ca84f94123df Mon Sep 17 00:00:00 2001
|
||||
From a13d33c47c0e713429f7cfbd6106a497838f6396 Mon Sep 17 00:00:00 2001
|
||||
From: wangzengliang <wangzengliang1@huawei.com>
|
||||
Date: Fri, 8 Apr 2022 10:19:18 +0800
|
||||
Date: Fri, 8 Apr 2022 11:35:38 +0800
|
||||
Subject: [PATCH] cmake: add support python 3.10
|
||||
|
||||
---
|
||||
cmake/modules/BuildBoost.cmake | 2 +-
|
||||
cmake/modules/FindPython/Support.cmake | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
src/boost/libs/python/src/exec.cpp | 4 ++--
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
|
||||
index 468ae419c..320c2dcd5 100644
|
||||
@ -34,6 +35,23 @@ index c05bbe330..fb362bfe2 100644
|
||||
elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
|
||||
set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
else()
|
||||
diff --git a/src/boost/libs/python/src/exec.cpp b/src/boost/libs/python/src/exec.cpp
|
||||
index 171c6f418..caa7d0864 100644
|
||||
--- a/src/boost/libs/python/src/exec.cpp
|
||||
+++ b/src/boost/libs/python/src/exec.cpp
|
||||
@@ -106,10 +106,10 @@ object BOOST_PYTHON_DECL exec_file(char const *filename, object global, object l
|
||||
char *f = const_cast<char *>(filename);
|
||||
// Let python open the file to avoid potential binary incompatibilities.
|
||||
#if PY_VERSION_HEX >= 0x03040000
|
||||
- FILE *fs = _Py_fopen(f, "r");
|
||||
+ FILE *fs = fopen(f, "r");
|
||||
#elif PY_VERSION_HEX >= 0x03000000
|
||||
PyObject *fo = Py_BuildValue("s", f);
|
||||
- FILE *fs = _Py_fopen(fo, "r");
|
||||
+ FILE *fs = fopen(fo, "r");
|
||||
Py_DECREF(fo);
|
||||
#else
|
||||
PyObject *pyfile = PyFile_FromString(f, const_cast<char*>("r"));
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From 4655a4fad848d2d844c19e375d34e0bf3a6228dc Mon Sep 17 00:00:00 2001
|
||||
From: markeryang <yanglongkang@huawei.com>
|
||||
Date: Fri, 13 Aug 2021 18:33:22 +0800
|
||||
Subject: [PATCH] fix error PTHREAD_STACK_MIN
|
||||
|
||||
Signed-off-by: markeryang <yanglongkang@huawei.com>
|
||||
Signed-off-by: lxk <lixiaokeng@huawei.com>
|
||||
---
|
||||
src/boost/boost/thread/pthread/thread_data.hpp | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/boost/boost/thread/pthread/thread_data.hpp b/src/boost/boost/thread/pthread/thread_data.hpp
|
||||
index aefbeb43..9e459b1f 100644
|
||||
--- a/src/boost/boost/thread/pthread/thread_data.hpp
|
||||
+++ b/src/boost/boost/thread/pthread/thread_data.hpp
|
||||
@@ -57,8 +57,9 @@ namespace boost
|
||||
#else
|
||||
std::size_t page_size = ::sysconf( _SC_PAGESIZE);
|
||||
#endif
|
||||
-#if PTHREAD_STACK_MIN > 0
|
||||
- if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
|
||||
+#ifdef PTHREAD_STACK_MIN
|
||||
+ if (PTHREAD_STACK_MIN > 0 && size < (std::size_t)PTHREAD_STACK_MIN)
|
||||
+ size = (std::size_t)PTHREAD_STACK_MIN;
|
||||
#endif
|
||||
size = ((size+page_size-1)/page_size)*page_size;
|
||||
int res = pthread_attr_setstacksize(&val_, size);
|
||||
--
|
||||
2.23.0
|
||||
@ -1,62 +0,0 @@
|
||||
From 06ca2eba72fa5c23602f45dfeb770c62d1f20a76 Mon Sep 17 00:00:00 2001
|
||||
From: luo rixin <luorixin@huawei.com>
|
||||
Date: Wed, 19 May 2021 10:27:18 +0800
|
||||
Subject: [PATCH] common/crc32c_aarch64: fix crc32c unittest failed on aarch64
|
||||
|
||||
On centos 8.2 for aarch64 with gcc 8.3, the complier will use
|
||||
register v0 conflicting with the register v0 be usded in inline
|
||||
asm code. Adding the related registers into clobber list to inform
|
||||
complier avoiding the confict.
|
||||
|
||||
Fixes: https://tracker.ceph.com/issues/50835
|
||||
|
||||
Signed-off-by: luo rixin <luorixin@huawei.com>
|
||||
---
|
||||
src/common/crc32c_aarch64.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/common/crc32c_aarch64.c b/src/common/crc32c_aarch64.c
|
||||
index d15736a0cd..99e5883994 100644
|
||||
--- a/src/common/crc32c_aarch64.c
|
||||
+++ b/src/common/crc32c_aarch64.c
|
||||
@@ -147,7 +147,7 @@ uint32_t ceph_crc32c_aarch64(uint32_t crc, unsigned char const *buffer, unsigned
|
||||
"mov x16, #0x8014 \n\t"
|
||||
"movk x16, #0x8f15, lsl 16 \n\t"
|
||||
"mov v0.2d[0], x16 \n\t"
|
||||
- :::"x16");
|
||||
+ :::"x16","v0","v1");
|
||||
|
||||
while ((length -= 1024) >= 0) {
|
||||
PREF1KL2(1024*3);
|
||||
@@ -178,7 +178,8 @@ uint32_t ceph_crc32c_aarch64(uint32_t crc, unsigned char const *buffer, unsigned
|
||||
"crc32cx %w[c0], wzr, %x[c0] \n\t"
|
||||
"eor %w[c], %w[c], %w[c0] \n\t"
|
||||
:[c1]"+r"(crc1), [c0]"+r"(crc0), [c2]"+r"(crc2), [c]"+r"(crc)
|
||||
- :[v]"r"(*((const uint64_t *)buffer)));
|
||||
+ :[v]"r"(*((const uint64_t *)buffer))
|
||||
+ :"v0","v1","v2","v3");
|
||||
buffer += sizeof(uint64_t);
|
||||
}
|
||||
#endif /* HAVE_ARMV8_CRC_CRYPTO_INTRINSICS */
|
||||
@@ -229,7 +230,7 @@ uint32_t ceph_crc32c_aarch64(uint32_t crc, unsigned char const *buffer, unsigned
|
||||
__asm__("mov x16, #0xf38a \n\t"
|
||||
"movk x16, #0xe417, lsl 16 \n\t"
|
||||
"mov v1.2d[0], x16 \n\t"
|
||||
- :::"x16");
|
||||
+ :::"x16","v1");
|
||||
|
||||
while ((length -= 1024) >= 0) {
|
||||
__asm__("crc32cx %w[c0], %w[c], xzr\n\t"
|
||||
@@ -247,7 +248,8 @@ uint32_t ceph_crc32c_aarch64(uint32_t crc, unsigned char const *buffer, unsigned
|
||||
"mov %x[c0], v3.2d[0] \n\t"
|
||||
"crc32cx %w[c], wzr, %x[c0] \n\t"
|
||||
:[c]"=r"(crc)
|
||||
- :[c0]"r"(crc0));
|
||||
+ :[c0]"r"(crc0)
|
||||
+ :"v1","v3");
|
||||
}
|
||||
#endif /* HAVE_ARMV8_CRC_CRYPTO_INTRINSICS */
|
||||
|
||||
--
|
||||
2.24.4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user