消除一些编译警告

This commit is contained in:
2025-06-26 00:33:08 +08:00
parent 5411714133
commit 8928998479
4 changed files with 12 additions and 50 deletions

View File

@@ -12,7 +12,7 @@ OBJCPY="riscv64-unknown-elf-objcopy"
OBJDUMP="riscv64-unknown-elf-objdump"
CFLAG=[
"-march=rv32i",
"-march=rv32i_zicsr",
"-mabi=ilp32",
"-ffunction-sections",
"-fdata-sections",
@@ -137,7 +137,7 @@ def build_depend(src:list):
dst=os.path.join(OUTPUT,dst)
if(check_rebuild(dst,[i])):
cmd=f"{CC} -MM {i} -o {dst} {flags}"
print(cmd)
print(f"更新 {dst}")
ret=os.system(cmd)
if(ret):
exit()
@@ -170,7 +170,7 @@ def build_object(src:list):
# print(f"{i} 没有更新依赖关系")
pass
if(len(cmd)>0):
print(cmd)
print(f"编译 {dst}")
ret=os.system(cmd)
if(ret):
exit()
@@ -186,7 +186,7 @@ def build_target(src:list):
dst=os.path.join(OUTPUT,TARGET)+".elf"
if(check_rebuild(dst,obj_list)):
cmd=f"{CC} {' '.join(obj_list)} -o {dst} {flags} -T{LD_FILE} -Wall -Wextra -nostartfiles -Wl,-Map,\"{OUTPUT}/{TARGET}.map\""
print(cmd)
print(f"链接 {dst}")
ret=os.system(cmd)
if(ret):
exit()