Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lihongda1002
oceanbase
提交
9175be16
O
oceanbase
项目概览
lihongda1002
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9175be16
编写于
5月 16, 2022
作者:
W
wenxingsen
提交者:
wangzelin.wzl
5月 16, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support sw_64 arch build
上级
addaaac2
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
74 addition
and
12 deletion
+74
-12
cmake/Env.cmake
cmake/Env.cmake
+29
-10
deps/3rd/dep_create.sh
deps/3rd/dep_create.sh
+6
-0
deps/3rd/oceanbase.el20.sw_64.deps
deps/3rd/oceanbase.el20.sw_64.deps
+24
-0
deps/easy/src/io/easy_socket.h
deps/easy/src/io/easy_socket.h
+3
-0
deps/oblib/src/CMakeLists.txt
deps/oblib/src/CMakeLists.txt
+10
-0
deps/oblib/src/lib/charset/ob_charset.cpp
deps/oblib/src/lib/charset/ob_charset.cpp
+1
-0
deps/oblib/src/lib/json_type/ob_json_bin.h
deps/oblib/src/lib/json_type/ob_json_bin.h
+1
-2
未找到文件。
cmake/Env.cmake
浏览文件 @
9175be16
include
(
CMakeFindBinUtils
)
EXECUTE_PROCESS
(
COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE
)
message
(
STATUS
"DETECT BUILD ARCH: "
${
ARCHITECTURE
}
)
ob_define
(
DEVTOOLS_DIR
"
${
CMAKE_SOURCE_DIR
}
/deps/3rd/usr/local/oceanbase/devtools"
)
ob_define
(
DEP_DIR
"
${
CMAKE_SOURCE_DIR
}
/deps/3rd/usr/local/oceanbase/deps/devel"
)
...
...
@@ -25,6 +29,16 @@ set(DEBUG_PREFIX "-fdebug-prefix-map=${CMAKE_SOURCE_DIR}=.")
set
(
LD_OPT
"-Wl,--build-id=uuid"
)
set
(
BUILD_OPT
"
${
DEBUG_PREFIX
}
"
)
if
(
${
ARCHITECTURE
}
STREQUAL
"sw_64"
)
set
(
OB_USE_CLANG OFF
)
set
(
OB_USE_LLVM_LIBTOOLS OFF
)
set
(
OBJCOPY_BIN
"
${
DEVTOOLS_DIR
}
/swgcc830_native_tools/usr/bin/objcopy"
)
set
(
LD_BIN
"
${
DEVTOOLS_DIR
}
/swgcc830_native_tools/usr/bin/ld"
)
set
(
OB_CC
"
${
DEVTOOLS_DIR
}
/swgcc830_native_tools/usr/bin/gcc"
)
set
(
OB_CXX
"
${
DEVTOOLS_DIR
}
/swgcc830_native_tools/usr/bin/g++"
)
set
(
BUILD_OPT
"
${
BUILD_OPT
}
--sysroot=
${
DEVTOOLS_DIR
}
/swgcc830_native_tools/"
)
endif
()
if
(
OB_USE_LLVM_LIBTOOLS
)
# use llvm-ar llvm-ranlib llvm-objcopy ld.lld...
set
(
_CMAKE_TOOLCHAIN_PREFIX llvm-
)
...
...
@@ -79,13 +93,19 @@ if (OB_USE_CLANG)
set
(
CMAKE_SHARED_LINKER_FLAGS
"
${
LD_OPT
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
LD_OPT
}
"
)
else
()
# not clang, use gcc52
else
()
# not clang, use gcc (such as gcc52 in x86_64)
if
(
NOT DEFINED OB_CC
)
find_program
(
OB_CC gcc
PATHS
"
${
DEVTOOLS_DIR
}
/bin"
NO_DEFAULT_PATH
)
find_program
(
OB_CXX g++
endif
()
if
(
NOT DEFINED OB_CXX
)
find_program
(
OB_CC g++
PATHS
"
${
DEVTOOLS_DIR
}
/bin"
NO_DEFAULT_PATH
)
endif
()
set
(
BUILD_OPT
"
${
BUILD_OPT
}
-fdiagnostics-color"
)
set
(
LD_OPT
"
${
LD_OPT
}
-z noexecstack"
)
...
...
@@ -109,9 +129,6 @@ else()
message
(
FATAL_ERROR
"COMPILER NOT FOUND"
)
endif
()
include
(
CMakeFindBinUtils
)
EXECUTE_PROCESS
(
COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE
)
message
(
STATUS
"DETECT BUILD ARCH: "
${
ARCHITECTURE
}
)
if
(
${
ARCHITECTURE
}
STREQUAL
"x86_64"
)
set
(
MTUNE_CFLAGS
"-mtune=core2"
)
set
(
ARCH_LDFLAGS
""
)
...
...
@@ -122,6 +139,8 @@ elseif(${ARCHITECTURE} STREQUAL "aarch64")
elseif
(
${
ARCHITECTURE
}
STREQUAL
"loongarch64"
)
set
(
MARCH_CFLAGS
"-march=la464"
)
set
(
MTUNE_CFLAGS
"-mabi=lp64d"
)
elseif
(
${
ARCHITECTURE
}
STREQUAL
"sw_64"
)
set
(
ARCH_LDFLAGS
"-latomic -llzma"
)
else
()
message
(
FATAL_ERROR
"UNSUPPORT BUILD ARCH:
${
ARCHITECTURE
}
"
)
endif
()
deps/3rd/dep_create.sh
浏览文件 @
9175be16
...
...
@@ -87,6 +87,12 @@ function get_os_release() {
version_ge
"7.0"
&&
OS_RELEASE
=
7
&&
return
;;
esac
elif
[[
"
${
OS_ARCH
}
x"
==
"sw_64x"
]]
;
then
case
"
$ID
"
in
UOS
)
version_ge
"20"
&&
OS_RELEASE
=
20
&&
return
;;
esac
fi
not_supported
&&
return
1
}
...
...
deps/3rd/oceanbase.el20.sw_64.deps
0 → 100644
浏览文件 @
9175be16
[target-default]
os=20
arch=sw_64
repo=https://mirrors.aliyun.com/oceanbase/development-kit/uos/20/sw_64/
[deps]
devdeps-gtest-1.8.0-1.uos20.sw_64.rpm
devdeps-isa-l-static-2.22.0-1.uos20.sw_64.rpm
devdeps-libcurl-static-7.29.0-1.uos20.sw_64.rpm
devdeps-libunwind-static-1.6.2-1.uos20.sw_64.rpm
devdeps-mariadb-connector-c-3.1.12-1.uos20.sw_64.rpm
devdeps-openssl-static-1.0.1e-1.uos20.sw_64.rpm
devdeps-libaio-0.3.112-1.uos20.sw_64.rpm
devdeps-rapidjson-1.1.0-1.uos20.sw_64.rpm
[tools]
obdevtools-bison-2.4.1-1.uos20.sw_64.rpm
obdevtools-ccache-3.7.12-1.uos20.sw_64.rpm
obdevtools-cmake-3.20.2-1.uos20.sw_64.rpm
obdevtools-flex-2.5.35-1.uos20.sw_64.rpm
obdevtools-gcc-8.3.0-1.uos20.sw_64.rpm
[tool-deps]
devdeps-rocksdb-6.22.1-1.uos20.sw_64.rpm
deps/easy/src/io/easy_socket.h
浏览文件 @
9175be16
...
...
@@ -24,7 +24,10 @@ EASY_CPP_START
#define EASY_FLAGS_REUSEPORT 0x002
#define EASY_FLAGS_SREUSEPORT 0x004
#define EASY_FLAGS_NOLISTEN 0x008
#ifndef SO_REUSEPORT
#define SO_REUSEPORT 15
#endif
int
easy_unix_domain_listen
(
const
char
*
path
,
int
backlog
);
int
easy_socket_listen
(
int
udp
,
easy_addr_t
*
address
,
int
*
flags
,
int
backlog
);
...
...
deps/oblib/src/CMakeLists.txt
浏览文件 @
9175be16
...
...
@@ -40,6 +40,16 @@ else()
-Wno-psabi -Wno-sign-compare -Wno-unused-variable
${
ARCH_COMPILE_OPTIONS
}
$<$<COMPILE_LANGUAGE:C>:-Wno-old-style-declaration>
$<$<COMPILE_LANGUAGE:CXX>:-Wno-literal-suffix -Wno-invalid-offsetof>
)
if
(
${
ARCHITECTURE
}
STREQUAL
"sw_64"
)
target_compile_options
(
oblib_base_base
INTERFACE
-Wno-type-limits -Wno-implicit-fallthrough -Wno-deprecated-declarations
-Wno-nonnull-compare -Wno-tautological-compare -Wno-extra -Wno-parentheses
-Wno-memset-elt-size -Wno-comment -Wno-int-in-bool-context -Wno-unused-but-set-parameter
-Wno-ignored-qualifiers -Wno-unused-but-set-variable -Wno-unused-value -Wno-format-truncation
$<$<COMPILE_LANGUAGE:CXX>:-Wno-class-memaccess -Wno-aligned-new>
)
endif
()
endif
()
target_compile_features
(
oblib_base_base INTERFACE cxx_std_11
)
...
...
deps/oblib/src/lib/charset/ob_charset.cpp
浏览文件 @
9175be16
...
...
@@ -15,6 +15,7 @@
#include "lib/utility/serialization.h"
#include "lib/ob_define.h"
#include "lib/worker.h"
#include "math.h"
namespace
oceanbase
{
namespace
common
{
...
...
deps/oblib/src/lib/json_type/ob_json_bin.h
浏览文件 @
9175be16
...
...
@@ -460,7 +460,6 @@ private:
uint64_t
new_val_entry_offset
,
uint64_t
count
,
uint8_t
var_type
,
int64_t
st_pos
,
ObJsonBuffer
&
result
,
ObJBVerType
cur_vertype
,
ObJBVerType
dest_vertype
)
const
;
#define JB_PATH_NODE_LEN sizeof(struct ObJBNodeMeta)
void
stack_update
(
ObJsonBuffer
&
stack
,
uint32_t
idx
,
const
ObJBNodeMeta
&
new_value
);
int
stack_copy
(
ObJsonBuffer
&
src
,
ObJsonBuffer
&
dst
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录