Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
obproxy
提交
a109c0ad
O
obproxy
项目概览
oceanbase
/
obproxy
1 年多 前同步成功
通知
11
Star
100
Fork
70
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obproxy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
a109c0ad
编写于
3月 02, 2022
作者:
LINGuanRen
提交者:
wangzelin.wzl
3月 02, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add compilation compatibility about other x86_64 system
上级
178a779f
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
96 addition
and
13 deletion
+96
-13
build.sh
build.sh
+6
-6
configure.ac
configure.ac
+7
-5
deps/3rd/dep_create.sh
deps/3rd/dep_create.sh
+83
-2
未找到文件。
build.sh
浏览文件 @
a109c0ad
#!/bin/sh
#!/bin/
ba
sh
TOPDIR
=
"
$(
dirname
$(
readlink
-f
"
$0
"
))
"
DEP_DIR
=
${
TOPDIR
}
/deps/3rd/usr/local/oceanbase/deps/devel
TOOLS_DIR
=
${
TOPDIR
}
/deps/3rd/usr/local/oceanbase/devtools
...
...
@@ -13,10 +13,10 @@ function sw()
export
RUNTIME_DIR
;
export
DEP_VAR
=
$DEP_DIR
/var/
;
/sbin/ldconfig
-n
$DEP_DIR
/lib
;
export
LD_LIBRARY_PATH
=
$DEP_DIR
/lib:
$DEP_VAR
/usr/local/lib64:
$DEP_VAR
/usr/local/lib:
$DEP_VAR
/usr/lib64:
$DEP_VAR
/usr/lib
;
export
LIBRARY_PATH
=
$DEP_DIR
/lib:
$DEP_VAR
/usr/local/lib64:
$DEP_VAR
/usr/local/lib:
$DEP_VAR
/usr/lib64:
$DEP_VAR
/usr/lib
;
export
CPLUS_INCLUDE_PATH
=
$DEP_DIR
/include:
${
RUNTIME_DIR
}
/include:
$DEP_VAR
/usr/local/include:
$DEP_VAR
/usr/include
;
export
C_INCLUDE_PATH
=
$DEP_DIR
/include:
${
RUNTIME_DIR
}
/include
;
export
LD_LIBRARY_PATH
=
$DEP_DIR
/lib:
$DEP_VAR
/usr/local/lib64:
$DEP_VAR
/usr/local/lib:
$DEP_VAR
/usr/lib64:
$DEP_VAR
/usr/lib
:
$DEP_VAR
/lib64:/usr/lib/x86_64-linux-gnu
;
export
LIBRARY_PATH
=
$DEP_DIR
/lib:
$DEP_VAR
/usr/local/lib64:
$DEP_VAR
/usr/local/lib:
$DEP_VAR
/usr/lib64:
$DEP_VAR
/usr/lib
:/usr/lib/x86_64-linux-gnu
;
export
CPLUS_INCLUDE_PATH
=
$DEP_DIR
/include:
${
RUNTIME_DIR
}
/include:
$DEP_VAR
/usr/local/include:
$DEP_VAR
/usr/include
:
$DEP_VAR
/devel/include:/usr/include/x86_64-linux-gnu
;
export
C_INCLUDE_PATH
=
$DEP_DIR
/include:
${
RUNTIME_DIR
}
/include
:/usr/include/x86_64-linux-gnu
;
export
PATH
=
$DEP_DIR
/bin:
$TOOLS_DIR
/bin:
$PATH
;
}
...
...
@@ -35,7 +35,7 @@ function do_init()
function
do_dep_init
()
{
(
cd
$TOPDIR
/deps/3rd
&&
sh dep_create.sh
)
(
cd
$TOPDIR
/deps/3rd
&&
ba
sh dep_create.sh
)
cd
$TOPDIR
do_init
}
...
...
configure.ac
浏览文件 @
a109c0ad
...
...
@@ -26,17 +26,17 @@
if test "$withval" = "yes"; then
case "$host_cpu" in
*aarch64* )
AM_CXXFLAGS="-g -O2 -D_OB_VERSION=1000 -D_NO_EXCEPTION -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wextra -W
unused-parameter -Wformat -Wconversion -Wno-deprecated -Wno-invalid-offsetof
-finline-functions -fno-strict-aliasing -mtune=generic -Wno-psabi -Wno-sign-compare"
AM_CXXFLAGS="-g -O2 -D_OB_VERSION=1000 -D_NO_EXCEPTION -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wextra -W
no-unused-parameter -Wformat -Wno-conversion -Wno-deprecated -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security
-finline-functions -fno-strict-aliasing -mtune=generic -Wno-psabi -Wno-sign-compare"
AM_CFLAGS="-g -O2 -D_OB_VERSION=1000 -DCOMPATIBLE -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -finline-functions -fno-strict-aliasing -Wall -mtune=generic -Wno-psabi -Wno-sign-compare"
;;
* )
AM_CXXFLAGS="-g -O2 -D_OB_VERSION=1000 -D_NO_EXCEPTION -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wextra -W
unused-parameter -Wformat -Wconversion -Wno-deprecated -Wno-invalid-offsetof
-finline-functions -fno-strict-aliasing -mtune=core2 -Wno-psabi -Wno-sign-compare"
AM_CXXFLAGS="-g -O2 -D_OB_VERSION=1000 -D_NO_EXCEPTION -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wextra -W
no-unused-parameter -Wformat -Wno-conversion -Wno-deprecated -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security
-finline-functions -fno-strict-aliasing -mtune=core2 -Wno-psabi -Wno-sign-compare"
AM_CFLAGS="-g -O2 -D_OB_VERSION=1000 -DCOMPATIBLE -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -finline-functions -fno-strict-aliasing -Wall -mtune=core2 -Wno-psabi -Wno-sign-compare"
;;
esac
fi
],
[ AM_CXXFLAGS="-D__STDC_LIMIT_MACROS -D_OB_VERSION=1000 -D__STDC_CONSTANT_MACROS -D_NO_EXCEPTION -g -Wall -Wextra -W
unused-parameter -Wformat -Wconversion -Wno-invalid-offsetof
-Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -mtune=generic -Wno-psabi -Wno-sign-compare"
[ AM_CXXFLAGS="-D__STDC_LIMIT_MACROS -D_OB_VERSION=1000 -D__STDC_CONSTANT_MACROS -D_NO_EXCEPTION -g -Wall -Wextra -W
no-unused-parameter -Wformat -Wno-conversion -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security
-Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -mtune=generic -Wno-psabi -Wno-sign-compare"
AM_CFLAGS="-D_OB_VERSION=1000 -DCOMPATIBLE -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-omit-frame-pointer -g -Wall -Wno-psabi -Wno-sign-compare"
]
)
...
...
@@ -53,6 +53,8 @@
AM_CXXFLAGS="${AM_CXXFLAGS} -DGCC_52"
fi
AM_CXXFLAGS="${AM_CXXFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0"
gcc_version="4.4.4"
dnl condition OPT_GCC_VERSION
AC_ARG_WITH([gcc-version],
...
...
@@ -176,7 +178,7 @@
AM_LDFLAGS="${AM_LDFLAGS} -L${DEP_DIR}/lib -L${DEP_DIR}/lib/mysql"
dnl global default INCLUDES
AM_C
PPFLAGS="${AM_CPPFLAGS} -I${DEP_DIR}/include -I${DEP_DIR}/include/mysql
"
AM_C
XXFLAGS="${AM_CXXFLAGS} -I${DEP_DIR}/include -I${DEP_DIR}/include/mariadb -I${RUNTIME_DIR}/include
"
if test "X${CXXFLAGS}" = "X-g -O2"; then
CXXFLAGS=""
...
...
@@ -301,7 +303,7 @@
AC_DEFINE_UNQUOTED([RELEASEID], "$RELEASEID")
dnl LDADD
AM_LDFLAGS="${AM_LDFLAGS} -Wl,--allow-multiple-definition"
AM_LDFLAGS="${AM_LDFLAGS} -Wl,--
no-as-needed -Wl,--
allow-multiple-definition"
BIN_LDFLAGS="-lc -lrt"
if test "X5.2.0" = "X$GCC_VERSION"; then
...
...
deps/3rd/dep_create.sh
浏览文件 @
a109c0ad
...
...
@@ -5,8 +5,89 @@ unalias -a
PWD
=
"
$(
cd
$(
dirname
$0
)
;
pwd
)
"
OS_RELEASE
=
"
$(
grep
-Po
'(?<=release )\d'
/etc/redhat-release
)
"
||
exit
1
OS_ARCH
=
"
$(
uname
-p
)
"
||
exit
1
OS_ARCH
=
"
$(
uname
-m
)
"
||
exit
1
OS_RELEASE
=
"0"
if
[[
!
-f
/etc/os-release
]]
;
then
echo
"[ERROR] os release info not found"
1>&2
&&
exit
1
fi
source
/etc/os-release
||
exit
1
PNAME
=
${
PRETTY_NAME
:-
"
${
NAME
}
${
VERSION
}
"
}
PNAME
=
"
${
PNAME
}
(
${
OS_ARCH
}
)"
function
compat_centos8
()
{
echo
"[NOTICE] '
$PNAME
' is compatible with CentOS 8, use el8 dependencies list"
OS_RELEASE
=
8
}
function
compat_centos7
()
{
echo
"[NOTICE] '
$PNAME
' is compatible with CentOS 7, use el7 dependencies list"
OS_RELEASE
=
7
}
function
not_supported
()
{
echo
"[ERROR] '
$PNAME
' is not supported yet."
}
function
version_ge
()
{
test
"
$(
awk
-v
v1
=
$VERSION_ID
-v
v2
=
$1
'BEGIN{print(v1>=v2)?"1":"0"}'
2>/dev/null
)
"
==
"1"
}
function
get_os_release
()
{
if
[[
"
${
OS_ARCH
}
x"
==
"x86_64x"
]]
;
then
case
"
$ID
"
in
alinux
)
version_ge
"2.1903"
&&
compat_centos7
&&
return
;;
alios
)
version_ge
"8.0"
&&
compat_centos8
&&
return
version_ge
"7.2"
&&
compat_centos7
&&
return
;;
anolis
)
version_ge
"8.0"
&&
compat_centos8
&&
return
version_ge
"7.0"
&&
compat_centos7
&&
return
;;
ubuntu
)
version_ge
"16.04"
&&
compat_centos7
&&
return
;;
centos
)
version_ge
"8.0"
&&
OS_RELEASE
=
8
&&
return
version_ge
"7.0"
&&
OS_RELEASE
=
7
&&
return
;;
debian
)
version_ge
"9"
&&
compat_centos7
&&
return
;;
fedora
)
version_ge
"33"
&&
compat_centos7
&&
return
;;
opensuse-leap
)
version_ge
"15"
&&
compat_centos7
&&
return
;;
#suse
sles
)
version_ge
"15"
&&
compat_centos7
&&
return
;;
uos
)
version_ge
"20"
&&
compat_centos7
&&
return
;;
esac
elif
[[
"
${
OS_ARCH
}
x"
==
"aarch64x"
]]
;
then
case
"
$ID
"
in
alios
)
version_ge
"7.0"
&&
compat_centos7
&&
return
;;
centos
)
version_ge
"8.0"
&&
compat_centos7
&&
return
version_ge
"7.0"
&&
OS_RELEASE
=
7
&&
return
;;
esac
fi
not_supported
&&
return
1
}
get_os_release
||
exit
1
OS_TAG
=
"el
$OS_RELEASE
.
$OS_ARCH
"
DEP_FILE
=
"obproxy.
${
OS_TAG
}
.deps"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录