Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
ec05a0b0
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看板
提交
ec05a0b0
编写于
6月 23, 2011
作者:
R
Rich Felker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
adapt build/install/gcc-wrapper systems for dynamic linking support
上级
b7f6e0c6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
9 deletion
+20
-9
Makefile
Makefile
+15
-5
dist/config.mak
dist/config.mak
+2
-2
tools/gen-musl-gcc.sh
tools/gen-musl-gcc.sh
+3
-2
未找到文件。
Makefile
浏览文件 @
ec05a0b0
...
...
@@ -35,14 +35,15 @@ EMPTY_LIBS = $(EMPTY_LIB_NAMES:%=lib/lib%.a)
CRT_LIBS
=
lib/crt1.o lib/crti.o lib/crtn.o
LIBC_LIBS
=
lib/libc.a
ALL_LIBS
=
$(LIBC_LIBS)
$(CRT_LIBS)
$(EMPTY_LIBS)
ALL_LDSO
=
lib/ld-musl-
$(ARCH)
.so.1
ALL_TOOLS
=
tools/musl-gcc
-include
config.mak
all
:
$(ALL_LIBS) $(ALL_TOOLS)
all
:
$(ALL_LIBS) $(ALL_TOOLS)
$(ALL_LDSO)
install
:
$(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(ALL_INCLUDES:include/%=$(DESTDIR)$(includedir)/%) $(ALL_TOOLS:tools/%=$(DESTDIR)$(bindir)/%)
install
:
$(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(ALL_INCLUDES:include/%=$(DESTDIR)$(includedir)/%) $(ALL_TOOLS:tools/%=$(DESTDIR)$(bindir)/%)
$(ALL_LDSO:%=$(DESTDIR)/%) $(ALL_LDSO:%/ld-musl-$(ARCH).so.1=$(DESTDIR)$(libdir)/libc.so)
clean
:
rm
-f
crt/
*
.o
...
...
@@ -74,7 +75,7 @@ include/bits/alltypes.h: include/bits/alltypes.h.sh
%.lo
:
%.c $(GENH)
$(CC)
$(CFLAGS)
$(INC)
$(PIC)
-c
-o
$@
$<
lib/l
ibc.so
:
$(LOBJS)
lib/l
d-musl-$(ARCH).so.1
:
$(LOBJS)
$(CC)
$(LDFLAGS)
-o
$@
$(LOBJS)
-lgcc
$(OBJCOPY)
--weaken
$@
...
...
@@ -91,15 +92,24 @@ lib/%.o: crt/%.o
cp
$<
$@
tools/musl-gcc
:
tools/gen-musl-gcc.sh config.mak
sh
$<
"
$(prefix)
"
>
$@
||
{
rm
-f
$@
;
exit
1
;
}
sh
$<
"
$(prefix)
"
"
$(ARCH)
"
>
$@
||
{
rm
-f
$@
;
exit
1
;
}
chmod
+x
$@
$(DESTDIR)$(bindir)/%
:
tools/%
install
-D
$<
$@
$(DESTDIR)$(
prefix)/%
:
%
$(DESTDIR)$(
libdir)/%
:
lib/
%
install
-D
-m
644
$<
$@
$(DESTDIR)$(includedir)/%
:
include/%
install
-D
-m
644
$<
$@
$(DESTDIR)/lib/ld-musl-$(ARCH).so.1
:
lib/ld-musl-$(ARCH).so.1
install
-D
-m
755
$<
$@
$(DESTDIR)$(libdir)/libc.so
:
$(DESTDIR)/lib/ld-musl-$(ARCH).so.1
echo
'GROUP ( /lib/ld-musl-
$(ARCH)
.so.1 )'
>
$@
.PRECIOUS
:
$(CRT_LIBS:lib/%=crt/%)
.PHONY
:
all clean install
dist/config.mak
浏览文件 @
ec05a0b0
...
...
@@ -20,5 +20,5 @@ exec_prefix = /usr/local
# Uncomment for warnings (as errors). Might need tuning to your gcc version.
#CFLAGS += -Werror -Wall -Wpointer-arith -Wcast-align -Wno-parentheses -Wno-char-subscripts -Wno-uninitialized -Wno-sequence-point -Wno-missing-braces -Wno-unused-value -Wno-overflow -Wno-int-to-pointer-cast
# Uncomment if you want to
build a shared library (experimental)
.
#
LIBC_LIBS += lib/libc.so
# Uncomment if you want to
disable building the shared library
.
#
ALL_LDSO =
tools/gen-musl-gcc.sh
浏览文件 @
ec05a0b0
#!/bin/sh
printf
'#!/bin/sh\n\nlibc_prefix="%s"\n
'
"
$1
"
printf
'#!/bin/sh\n\nlibc_prefix="%s"\n
arch="%s"\n'
"
$1
"
"
$2
"
cat
<<
"
EOF
"
libc_lib=
$libc_prefix
/lib
...
...
@@ -27,5 +27,6 @@ done
exec "
$0
" "
$@
"
' -std=gnu99 -nostdinc -nostdlib
\
-isystem "
$libc_inc
" -isystem "
$gcc_inc
"
\
-Wl,-xxxxxx "
$@
" -L"
$libc_lib
" -lc -L"
$libgcc
" -lgcc -Lxxxxxx -Wl,-nostdlib
-Wl,-xxxxxx "
$@
" -L"
$libc_lib
" -lc -L"
$libgcc
" -lgcc -Lxxxxxx
\
-Wl,-dynamic-linker /lib/ld-musl-"
$arch
".so.1 -Wl,-nostdlib
EOF
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录