From 8d665dc178f194f06bb87a8a265e9f72fb685a8f Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Mon, 22 Jul 2024 15:54:21 +0800 Subject: [PATCH 1/3] fix Signed-off-by: Lloyd-Pottiger --- libs/libarm-optimized-routines/aor.cpp | 33 +++++++++++--------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/libs/libarm-optimized-routines/aor.cpp b/libs/libarm-optimized-routines/aor.cpp index 1135477ae87..6024b82d683 100644 --- a/libs/libarm-optimized-routines/aor.cpp +++ b/libs/libarm-optimized-routines/aor.cpp @@ -1,4 +1,4 @@ -// Copyright 2022 PingCAP, Inc. +// Copyright 2024 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,12 +32,14 @@ extern "C" __attribute__((visibility("default"))) void * memset(void * dst, int return inline_memset(dst, c, size); } -extern "C" __attribute__((visibility("default"))) void * memchr(const void * src, int c, size_t size) +extern "C++" __attribute__((visibility("default"))) const void * memchr(const void * src, int c, size_t size) noexcept( + true) { return inline_memchr(src, c, size); } -extern "C" __attribute__((visibility("default"))) void * memrchr(const void * src, int c, size_t size) +extern "C++" __attribute__((visibility("default"))) const void * memrchr(const void * src, int c, size_t size) noexcept( + true) { return inline_memrchr(src, c, size); } @@ -47,54 +49,47 @@ extern "C" __attribute__((visibility("default"))) int memcmp(const void * src1, return inline_memcmp(src1, src2, size); } -extern "C" __attribute__((visibility("default"))) inline char * strcpy( - char * __restrict dst_, - const char * __restrict src_) +extern "C" __attribute__((visibility("default"))) char * strcpy(char * __restrict dst_, const char * __restrict src_) { return inline_strcpy(dst_, src_); } -extern "C" __attribute__((visibility("default"))) inline char * stpcpy( - char * __restrict dst_, - const char * __restrict src_) +extern "C" __attribute__((visibility("default"))) char * stpcpy(char * __restrict dst_, const char * __restrict src_) { return inline_stpcpy(dst_, src_); } -extern "C" __attribute__((visibility("default"))) inline int strcmp(const char * src1_, const char * src2_) +extern "C" __attribute__((visibility("default"))) int strcmp(const char * src1_, const char * src2_) { return inline_strcmp(src1_, src2_); } -extern "C" __attribute__((visibility("default"))) inline char * strchr(const char * src_, int c) +extern "C++" __attribute__((visibility("default"))) const char * strchr(const char * src_, int c) noexcept(true) { return inline_strchr(src_, c); } -extern "C" __attribute__((visibility("default"))) inline char * strrchr(const char * src_, int c) +extern "C++" __attribute__((visibility("default"))) const char * strrchr(const char * src_, int c) noexcept(true) { return inline_strrchr(src_, c); } -extern "C" __attribute__((visibility("default"))) inline char * strchrnul(const char * src_, int c) +extern "C++" __attribute__((visibility("default"))) const char * strchrnul(const char * src_, int c) noexcept(true) { return inline_strchrnul(src_, c); } -extern "C" __attribute__((visibility("default"))) inline size_t strlen(const char * src_) +extern "C" __attribute__((visibility("default"))) size_t strlen(const char * src_) { return inline_strlen(src_); } -extern "C" __attribute__((visibility("default"))) inline size_t strnlen(const char * src_, size_t size) +extern "C" __attribute__((visibility("default"))) size_t strnlen(const char * src_, size_t size) { return inline_strnlen(src_, size); } -extern "C" __attribute__((visibility("default"))) inline int strncmp( - const char * src1_, - const char * src2_, - size_t size) +extern "C" __attribute__((visibility("default"))) int strncmp(const char * src1_, const char * src2_, size_t size) { return inline_strncmp(src1_, src2_, size); } From 29176ab5a8e5f5fccd664758f5464c1af1c36d32 Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Mon, 22 Jul 2024 16:20:17 +0800 Subject: [PATCH 2/3] fix Signed-off-by: Lloyd-Pottiger --- libs/libarm-optimized-routines/aor.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libs/libarm-optimized-routines/aor.cpp b/libs/libarm-optimized-routines/aor.cpp index 6024b82d683..b2afe0e0116 100644 --- a/libs/libarm-optimized-routines/aor.cpp +++ b/libs/libarm-optimized-routines/aor.cpp @@ -32,14 +32,12 @@ extern "C" __attribute__((visibility("default"))) void * memset(void * dst, int return inline_memset(dst, c, size); } -extern "C++" __attribute__((visibility("default"))) const void * memchr(const void * src, int c, size_t size) noexcept( - true) +extern "C++" __attribute__((visibility("default"))) void * memchr(const void * src, int c, size_t size) noexcept(true) { return inline_memchr(src, c, size); } -extern "C++" __attribute__((visibility("default"))) const void * memrchr(const void * src, int c, size_t size) noexcept( - true) +extern "C++" __attribute__((visibility("default"))) void * memrchr(const void * src, int c, size_t size) noexcept(true) { return inline_memrchr(src, c, size); } @@ -64,17 +62,17 @@ extern "C" __attribute__((visibility("default"))) int strcmp(const char * src1_, return inline_strcmp(src1_, src2_); } -extern "C++" __attribute__((visibility("default"))) const char * strchr(const char * src_, int c) noexcept(true) +extern "C++" __attribute__((visibility("default"))) char * strchr(const char * src_, int c) noexcept(true) { return inline_strchr(src_, c); } -extern "C++" __attribute__((visibility("default"))) const char * strrchr(const char * src_, int c) noexcept(true) +extern "C++" __attribute__((visibility("default"))) char * strrchr(const char * src_, int c) noexcept(true) { return inline_strrchr(src_, c); } -extern "C++" __attribute__((visibility("default"))) const char * strchrnul(const char * src_, int c) noexcept(true) +extern "C++" __attribute__((visibility("default"))) char * strchrnul(const char * src_, int c) noexcept(true) { return inline_strchrnul(src_, c); } From 762696819135f0ad916aaa0398d28aafbac5a6df Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Mon, 22 Jul 2024 17:02:04 +0800 Subject: [PATCH 3/3] fix Signed-off-by: Lloyd-Pottiger --- libs/libarm-optimized-routines/aor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/libarm-optimized-routines/aor.cpp b/libs/libarm-optimized-routines/aor.cpp index b2afe0e0116..b1b1270aef0 100644 --- a/libs/libarm-optimized-routines/aor.cpp +++ b/libs/libarm-optimized-routines/aor.cpp @@ -32,12 +32,12 @@ extern "C" __attribute__((visibility("default"))) void * memset(void * dst, int return inline_memset(dst, c, size); } -extern "C++" __attribute__((visibility("default"))) void * memchr(const void * src, int c, size_t size) noexcept(true) +extern "C" __attribute__((visibility("default"))) void * memchr(const void * src, int c, size_t size) { return inline_memchr(src, c, size); } -extern "C++" __attribute__((visibility("default"))) void * memrchr(const void * src, int c, size_t size) noexcept(true) +extern "C" __attribute__((visibility("default"))) void * memrchr(const void * src, int c, size_t size) { return inline_memrchr(src, c, size); } @@ -62,17 +62,17 @@ extern "C" __attribute__((visibility("default"))) int strcmp(const char * src1_, return inline_strcmp(src1_, src2_); } -extern "C++" __attribute__((visibility("default"))) char * strchr(const char * src_, int c) noexcept(true) +extern "C" __attribute__((visibility("default"))) char * strchr(const char * src_, int c) { return inline_strchr(src_, c); } -extern "C++" __attribute__((visibility("default"))) char * strrchr(const char * src_, int c) noexcept(true) +extern "C" __attribute__((visibility("default"))) char * strrchr(const char * src_, int c) { return inline_strrchr(src_, c); } -extern "C++" __attribute__((visibility("default"))) char * strchrnul(const char * src_, int c) noexcept(true) +extern "C" __attribute__((visibility("default"))) char * strchrnul(const char * src_, int c) { return inline_strchrnul(src_, c); }