Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
80072adc
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看板
未验证
提交
80072adc
编写于
2年前
作者:
O
openharmony_ci
提交者:
Gitee
2年前
浏览文件
操作
浏览文件
下载
差异文件
!553 修复emutls问题
Merge pull request !553 from dhy308/cherry-pick-1664246781
上级
5b65d32e
2e5c89ac
OpenHarmony-3.2-Beta3
OpenHarmony-v3.2-Beta3
无相关合并请求
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
67 addition
and
1 deletion
+67
-1
musl_src.gni
musl_src.gni
+1
-0
musl_template.gni
musl_template.gni
+17
-0
porting/linux/user/crt/crtplus.c
porting/linux/user/crt/crtplus.c
+25
-0
scripts/install.py
scripts/install.py
+24
-1
未找到文件。
musl_src.gni
浏览文件 @
80072adc
...
...
@@ -2094,6 +2094,7 @@ musl_src_porting_file = [
"src/exit/atexit.c",
"crt/arm/crti.s",
"crt/aarch64/crti.s",
"crt/crtplus.c",
"ldso/ld_log.h",
"ldso/namespace.c",
"ldso/ns_config.c",
...
...
This diff is collapsed.
Click to expand it.
musl_template.gni
浏览文件 @
80072adc
...
...
@@ -210,6 +210,7 @@ template("musl_libs") {
"${target_out_dir}/${musl_ported_dir}/crt/${musl_arch}/crtn.s",
"${target_out_dir}/${musl_ported_dir}/crt/Scrt1.c",
"${target_out_dir}/${musl_ported_dir}/crt/crt1.c",
"${target_out_dir}/${musl_ported_dir}/crt/crtplus.c",
"${target_out_dir}/${musl_ported_dir}/crt/rcrt1.c",
]
...
...
@@ -590,12 +591,28 @@ template("musl_libs") {
"${redir}/${target_out_dir}/${musl_ported_dir}/crt/soft_musl_crt/crt1.o",
"${redir}/${target_out_dir}/${musl_ported_dir}/crt/soft_musl_crt/rcrt1.o",
]
outputs = [ "${root_build_dir}/obj/third_party/musl/${_libs_out_dir}/{{source_file_part}}" ]
ldpath = []
if (is_mac) {
ldpath += [ "${clang_base_path}/bin/ld64.lld" ]
} else if (is_win) {
ldpath += [ "${clang_base_path}/bin/lld-link.exe" ]
} else {
ldpath += [ "${clang_base_path}/bin/ld.lld" ]
}
args = [
"--input",
"{{source}}",
]
args += [ "--output" ] + rebase_path(outputs, root_build_dir)
args += [ "--ldpath" ] + rebase_path(ldpath, root_build_dir)
args += [ "--crtplus" ] + rebase_path(
[ "${redir}/${target_out_dir}/${musl_ported_dir}/crt/soft_musl_crt/crtplus.o" ],
root_build_dir)
deps = [ ":soft_musl_crt" ]
}
...
...
This diff is collapsed.
Click to expand it.
porting/linux/user/crt/crtplus.c
0 → 100644
浏览文件 @
80072adc
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
__attribute__
((
weak
,
visibility
(
"hidden"
)))
void
__emutls_unregister_key
(
void
)
{
}
__attribute__
((
destructor
(
0
)))
static
void
__on_dlclose_late
(
void
)
{
__emutls_unregister_key
();
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/install.py
浏览文件 @
80072adc
...
...
@@ -3,8 +3,17 @@
import
os
import
sys
import
argparse
import
subprocess
from
shutil
import
copy
def
exec_command
(
cmd
,
log_path
=
'out/build.log'
,
**
kwargs
):
process
=
subprocess
.
Popen
(
cmd
)
process
.
wait
()
ret_code
=
process
.
returncode
if
ret_code
!=
0
:
raise
Exception
(
"{} failed, return code is {}"
.
format
(
cmd
,
ret_code
))
def
musl_copy_file
(
src
,
dest
):
dest_dir
=
os
.
path
.
dirname
(
dest
)
if
not
os
.
path
.
exists
(
dest_dir
):
...
...
@@ -24,9 +33,23 @@ def main():
help
=
'The output directory'
,
metavar
=
'FILE'
)
parser
.
add_argument
(
'--ldpath'
,
required
=
True
,
help
=
'The ld file path'
,
metavar
=
'FILE'
)
parser
.
add_argument
(
'--crtplus'
,
required
=
True
,
help
=
'The crtplus file path'
,
metavar
=
'FILE'
)
args
=
parser
.
parse_args
()
musl_copy_file
(
args
.
input
,
args
.
output
)
if
os
.
path
.
basename
(
args
.
input
)
==
'crtn.o'
:
ldargs
=
[
args
.
ldpath
,
"-r"
,
args
.
input
,
args
.
crtplus
,
"-o"
,
args
.
output
]
exec_command
(
ldargs
)
else
:
musl_copy_file
(
args
.
input
,
args
.
output
)
if
__name__
==
"__main__"
:
sys
.
exit
(
main
())
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
反馈
建议
客服
返回
顶部