summaryrefslogtreecommitdiff
path: root/components/libc/compilers/common/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'components/libc/compilers/common/SConscript')
-rw-r--r--components/libc/compilers/common/SConscript2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/libc/compilers/common/SConscript b/components/libc/compilers/common/SConscript
index fda7c6bf61..bb1abae5d5 100644
--- a/components/libc/compilers/common/SConscript
+++ b/components/libc/compilers/common/SConscript
@@ -11,6 +11,8 @@ if rtconfig.PLATFORM in ['armcc', 'armclang']:
CPPDEFINES += ['__CLK_TCK=RT_TICK_PER_SECOND']
elif rtconfig.PLATFORM in ['iccarm']:
CPPDEFINES += ['CLOCKS_PER_SEC=RT_TICK_PER_SECOND'] # forcly revert to 1 by IAR
+elif rtconfig.PLATFORM in ['gcc'] and rtconfig.CPU in ['posix']:
+ CPPDEFINES += ['_GNU_SOURCE'] # linux x86 platform gcc use!
src += Glob('*.c')