Skip to content

Commit 5833e02

Browse files
rcitachRbb666
authored andcommitted
Fix Aarch64 architecture runtime issues
该问题由5b3320624da5149fc21c2d3e1f321d855e3d0dfe引入,导致工具链编译时加上了 -std=gnu99,其他架构是否出问题暂时未知
1 parent e08fc29 commit 5833e02

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libcpu/aarch64/SConscript

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,12 @@ group = group + SConscript(os.path.join('common', 'SConscript'))
2424
if rtconfig.CPU != 'common':
2525
group = group + SConscript(os.path.join(rtconfig.CPU, 'SConscript'))
2626

27+
def del_gnu99():
28+
for g in Projects:
29+
if g["name"] == "Kernel":
30+
flags = re.sub(r'\s+', ' ', re.sub(r'\s*-std=gnu99\s*', ' ', g["LOCAL_CFLAGS"])).strip()
31+
flags = re.sub(r'(?<!\s)(-Wunused)', r' \1', flags)
32+
g["LOCAL_CFLAGS"] = flags
33+
34+
RegisterPreBuildingAction(del_gnu99)
2735
Return('group')

0 commit comments

Comments
 (0)