Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
da7e7649
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
1 年多 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
da7e7649
编写于
8月 11, 2021
作者:
O
openharmony_ci
提交者:
Gitee
8月 11, 2021
浏览文件
操作
浏览文件
下载
差异文件
!81 为L2提供musl 64位构建支持
Merge pull request !81 from zhuoli72/master
上级
56e030c9
1bc02f1c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
55 addition
and
27 deletion
+55
-27
BUILD.gn
BUILD.gn
+1
-0
musl_src.gni
musl_src.gni
+0
-3
musl_template.gni
musl_template.gni
+41
-22
scripts/copy_uapi.sh
scripts/copy_uapi.sh
+13
-2
未找到文件。
BUILD.gn
浏览文件 @
da7e7649
...
...
@@ -153,6 +153,7 @@ action("copy_uapi") {
script = "scripts/copy_uapi.sh"
args = [ "-i" ] + [ rebase_path("${uapi_dir}") ]
args += [ "-o" ] + [ rebase_path("${target_out_dir}/${musl_inc_out_dir}") ]
args += [ "-t" ] + [ "${musl_arch}" ]
}
copy("musl_copy_inc_bits") {
...
...
musl_src.gni
浏览文件 @
da7e7649
...
...
@@ -1595,9 +1595,6 @@ if (musl_arch == "arm") {
"arch/generic/bits/dirent.h",
"arch/generic/bits/errno.h",
"arch/generic/bits/fcntl.h",
"arch/generic/bits/fenv.h",
"arch/generic/bits/hwcap.h",
"arch/generic/bits/ioctl_fix.h",
"arch/generic/bits/ioctl.h",
"arch/generic/bits/io.h",
...
...
musl_template.gni
浏览文件 @
da7e7649
...
...
@@ -92,25 +92,27 @@ template("musl_libs") {
]
config("${abi_prefix}_musl_abi_config") {
if (target_abi == "soft") {
cflags = [ "-mfloat-abi=soft" ]
} else if (target_abi == "a7_soft") {
cflags = [
"-mcpu=cortex-a7",
"-mfloat-abi=soft",
]
} else if (target_abi == "a7_softfp_neon-vfpv4") {
cflags = [
"-mcpu=cortex-a7",
"-mfloat-abi=softfp",
"-mfpu=neon-vfpv4",
]
} else if (target_abi == "a7_hard_neon-vfpv4") {
cflags = [
"-mcpu=cortex-a7",
"-mfloat-abi=hard",
"-mfpu=neon-vfpv4",
]
if (musl_arch == "arm") {
if (target_abi == "soft") {
cflags = [ "-mfloat-abi=soft" ]
} else if (target_abi == "a7_soft") {
cflags = [
"-mcpu=cortex-a7",
"-mfloat-abi=soft",
]
} else if (target_abi == "a7_softfp_neon-vfpv4") {
cflags = [
"-mcpu=cortex-a7",
"-mfloat-abi=softfp",
"-mfpu=neon-vfpv4",
]
} else if (target_abi == "a7_hard_neon-vfpv4") {
cflags = [
"-mcpu=cortex-a7",
"-mfloat-abi=hard",
"-mfpu=neon-vfpv4",
]
}
}
}
...
...
@@ -128,12 +130,17 @@ template("musl_libs") {
cflags_basic = [
"--target=${musl_target_triple}",
"-march=armv7-a",
"-Wall",
"-D_FORTIFY_SOURCE=2",
"-Wl,-z,relro,-z,now,-z,noexecstack",
]
if (musl_arch == "arm") {
cflags_basic += [ "-march=armv7-a", ]
} else if (musl_arch == "aarch64") {
cflags_basic += [ "-march=armv8", ]
}
cflags_auto = [
"-D_XOPEN_SOURCE=700",
"-g",
...
...
@@ -220,9 +227,14 @@ template("musl_libs") {
"src/env/__init_tls.c",
"src/env/__libc_start_main.c",
"src/env/__stack_chk_fail.c",
"src/thread/${musl_arch}/__set_thread_area.c",
]
if (musl_arch == "arm") {
sources_orig -= [ "src/thread/${musl_arch}/__set_thread_area.c" ]
} else if (musl_arch == "aarch64") {
sources_orig -= [ "src/thread/${musl_arch}/__set_thread_area.s" ]
}
if ("${target_abi}" == "a7_hard_neon-vfpv4") {
defines = [ "__ARM_PCS_VFP" ]
}
...
...
@@ -251,9 +263,14 @@ template("musl_libs") {
"src/env/__init_tls.c",
"src/env/__libc_start_main.c",
"src/env/__stack_chk_fail.c",
"src/thread/${musl_arch}/__set_thread_area.c",
]
if (musl_arch == "arm") {
sources_orig += [ "src/thread/${musl_arch}/__set_thread_area.c" ]
} else if (musl_arch == "aarch64") {
sources_orig += [ "src/thread/${musl_arch}/__set_thread_area.s" ]
}
foreach(s, sources_orig) {
sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ]
}
...
...
@@ -385,6 +402,8 @@ template("musl_libs") {
":${abi_prefix}_musl_ldso",
":${abi_prefix}_musl_src",
":${abi_prefix}_musl_src_nossp",
":${abi_prefix}_libdl",
":${abi_prefix}_libpthread",
]
}
...
...
scripts/copy_uapi.sh
浏览文件 @
da7e7649
while
getopts
"o:i:h"
arg
while
getopts
"o:i:
t:
h"
arg
do
case
"
${
arg
}
"
in
"o"
)
...
...
@@ -8,6 +8,9 @@ do
"i"
)
SOURCE_DIR
=
${
OPTARG
}
;;
"t"
)
TARGET_ARCH
=
${
OPTARG
}
;;
"h"
)
echo
"help"
;;
...
...
@@ -22,6 +25,14 @@ if [ ! -d "${OUT_DIR}" ];then
mkdir
-p
${
OUT_DIR
}
fi
cp
-r
${
SOURCE_DIR
}
/
*
${
OUT_DIR
}
rm
-rf
${
OUT_DIR
}
/asm-arm
if
[
${
TARGET_ARCH
}
=
"arm"
]
;
then
mv
${
OUT_DIR
}
/asm-arm/asm
${
OUT_DIR
}
/asm
rm
-rf
${
OUT_DIR
}
/asm-arm64
rm
-rf
${
OUT_DIR
}
/asm-arm
elif
[
${
TARGET_ARCH
}
=
"aarch64"
]
;
then
mv
${
OUT_DIR
}
/asm-arm64/asm
${
OUT_DIR
}
/asm
rm
-rf
${
OUT_DIR
}
/asm-arm64
rm
-rf
${
OUT_DIR
}
/asm-arm
fi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录