diff options
| author | guozhanxin <[email protected]> | 2023-05-17 17:17:38 +0800 |
|---|---|---|
| committer | Man, Jianting (Meco) <[email protected]> | 2023-05-17 12:09:10 -0400 |
| commit | 82ccbc40db1d81eb35efd35f915096ddeee3b2b9 (patch) | |
| tree | bfd1f7f922aab312b1555bf41c8549e295a37c96 /components/libc/compilers/picolibc/SConscript | |
| parent | 48557de14897afb0965695d272d07f83f0b08c42 (diff) | |
support llvm-arm 16.0
Diffstat (limited to 'components/libc/compilers/picolibc/SConscript')
| -rw-r--r-- | components/libc/compilers/picolibc/SConscript | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/components/libc/compilers/picolibc/SConscript b/components/libc/compilers/picolibc/SConscript new file mode 100644 index 0000000000..999f7cca56 --- /dev/null +++ b/components/libc/compilers/picolibc/SConscript @@ -0,0 +1,29 @@ +import os +from building import * +from llvm_arm import * +Import('rtconfig') + +group = [] + +picolibc_version = GetPicoLibcVersion(rtconfig) + +if picolibc_version and not GetDepend('RT_USING_EXTERNAL_LIBC'): + print('PicoLibc version: ' + picolibc_version) + + cwd = GetCurrentDir() + src = Glob('*.c') + + CPPPATH = [cwd] + CPPDEFINES = ['RT_USING_PICOLIBC', 'RT_USING_LIBC', '_POSIX_C_SOURCE=1', '__PICOLIBC_ERRNO_FUNCTION=pico_get_errno'] # identify this is Newlib, and only enable POSIX.1-1990 + # LIBS = ['c', 'm'] # link libc and libm + AddDepend(['RT_USING_PICOLIBC', 'RT_USING_LIBC']) + + group = group + DefineGroup('Compiler', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)#, LIBS = LIBS) + + list = os.listdir(cwd) + for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + group = group + SConscript(os.path.join(d, 'SConscript')) + +Return('group') |
