Skip to content

Commit 9c90f5c

Browse files
authored
Merge pull request #5122 from mysterywolf/libc
[libc][newlib]在不开启libc的情况下,依然定义RT_USING_NEWLIB和数学库
2 parents 50433a5 + 11d193e commit 9c90f5c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

components/libc/compilers/gcc/newlib/SConscript

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@ Import('rtconfig')
44
src = []
55
cwd = GetCurrentDir()
66
group = []
7-
LIBS = []
8-
CPPDEFINES = []
7+
LIBS = ['m']
8+
CPPDEFINES = ['RT_USING_NEWLIB']
99
CPPPATH = [cwd]
1010

1111
if rtconfig.PLATFORM == 'gcc':
1212
if GetDepend('RT_USING_LIBC'):
13-
CPPDEFINES += ['RT_USING_NEWLIB']
1413
# link with libc and libm:
1514
# libm is a frequently used lib. Newlib is compiled with -ffunction-sections in
1615
# recent GCC tool chains. The linker would just link in the functions that have
1716
# been referenced. So setting this won't result in bigger text size.
18-
LIBS += ['c', 'm']
17+
LIBS += ['c']
1918

2019
src += Glob('*.c')
2120
if GetDepend('RT_USING_MODULE') == False:

0 commit comments

Comments
 (0)