forked from DragonOS-Community/DragonOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
完善libc,构建了OS-specific工具链,编译了基于gcc-11.3.0的DragonOS userland compiler,移…
…植了mpfr,gmp,mpc库 (DragonOS-Community#134) * 修改include路径 * 添加了创建libsysapi.a和/bin/sysroot/usr/include/+lib/的代码 * 修补.gitignore * 删除多余项 * 优化脚本可读性 * 新增crt0 crti crtn * 编译binutils所需的东西 * fflush()和fprintf()的简单实现 * 应用程序启动前,调用初始化libc的函数 * 自动创建sysroot * 添加了stderr的初始化 * 修改了stderr的初始化 * 内核添加对stdio的简略处理 * 格式化代码 * 修正打开stdio文件描述符的问题 * bugfix: 修复fprintf忘记释放buf的问题 * 修复shell错误地把入口设置为main而不是_start的问题 * 新增__cxa_atexit (gcc要求libc提供这个) * 增加putchar puts * 更新写入磁盘镜像的脚本,默认无参数时,使用legacy方式安装 * 更新编译脚本 * stdio增加eof的定义 * 新增extern cplusplus * mpfr gmp mpc 构建脚本 * 更新libsysapi.a为libc.a * 加上ferror fopen fclose * 更新移植的软件的构建脚本 * 更改build_gcc_toolchain.sh中的-save参数名为-save-cache Co-authored-by: longjin <[email protected]>
- Loading branch information
1 parent
61de2cd
commit 2224c93
Showing
49 changed files
with
746 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ kernel/kernel | |
.DS_Store | ||
|
||
*.o | ||
*.a | ||
*.s | ||
serial_opt.txt | ||
user/sys_api_lib | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
libc_arch_objs:= $(shell find ./*.c) | ||
|
||
ECHO: | ||
@echo "$@" | ||
|
||
|
||
$(libc_arch_objs): ECHO | ||
$(CC) $(CFLAGS) -c $@ -o $@.o | ||
|
||
all: $(libc_arch_objs) crti.o crtn.o | ||
mv crt0.c.o crt0.o | ||
|
||
crti.o: crti.S | ||
$(CC) -E crti.S > _crti.s # 预处理 | ||
$(AS) $(ASFLAGS) -o crti.o _crti.s | ||
|
||
crtn.o: crtn.S | ||
$(CC) -E crtn.S > _crtn.s # 预处理 | ||
$(AS) $(ASFLAGS) -o crtn.o _crtn.s | ||
|
||
clean: | ||
|
||
echo "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.