Browse Source

[libc]新建gcc文件夹,将newlib和partical文件夹并入

Meco Man 3 năm trước cách đây
mục cha
commit
8b17d53da7

+ 0 - 4
bsp/ls1bdev/Kconfig

@@ -18,10 +18,6 @@ config PKGS_DIR
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 
-config SOC_LS
-    bool
-    default y
-
 config SOC_LS1B
     bool
     select RT_USING_COMPONENTS_INIT

+ 0 - 4
bsp/ls1cdev/Kconfig

@@ -19,10 +19,6 @@ source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/libcpu/mips/common/Kconfig"
 source "$PKGS_DIR/Kconfig"
 
-config SOC_LS
-    bool
-    default y
-
 config SOC_LS1C300
     bool
     select RT_USING_COMPONENTS_INIT

+ 0 - 4
bsp/ls2kdev/Kconfig

@@ -22,10 +22,6 @@ source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/libcpu/mips/common/Kconfig"
 source "$PKGS_DIR/Kconfig"
 
-config SOC_LS
-    bool
-    default y
-
 config SOC_LS2K1000
     bool
     select ARCH_MIPS64

+ 0 - 23
components/libc/compilers/common/partial/ls/SConscript

@@ -1,23 +0,0 @@
-from shutil import copy
-from building import *
-
-Import('rtconfig')
-
-src   = []
-cwd   = GetCurrentDir()
-CPPPATH = [cwd]
-group = []
-
-if rtconfig.PLATFORM == 'gcc' and GetDepend('SOC_LS'):
-    try:
-        # There is no 'sys/select.h' in these bsp's gcc toolchain; thus, we need to copy this file from 'nogcc/sys/select.h'
-        copy("../../nogcc/sys/select.h", "./sys/select.h")
-    except:
-        pass
-
-    if GetDepend('RT_USING_LIBC'):
-        src += Glob('*.c')
-
-    group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH)
-
-Return('group')

+ 0 - 9
components/libc/compilers/common/partial/ls/readme.md

@@ -1,9 +0,0 @@
-This folder will be included when compiling the BSPs as follow:
-
-- ls1bdev
-- ls1cdev
-- ls2kdev
-
-These files will be generated by scons automatically , and **DO NOT** change them:
-
-- sys/select.h

+ 0 - 0
components/libc/compilers/common/partial/SConscript → components/libc/compilers/gcc/SConscript


+ 2 - 1
components/libc/compilers/newlib/README.md → components/libc/compilers/gcc/newlib/README.md

@@ -6,4 +6,5 @@ Please define RT_USING_LIBC and compile RT-Thread with GCC compiler.
 
 ## More Information
 
-https://sourceware.org/newlib/libc.html#Reentrancy
+https://sourceware.org/newlib/libc.html#Reentrancy
+

+ 0 - 0
components/libc/compilers/newlib/SConscript → components/libc/compilers/gcc/newlib/SConscript


+ 0 - 0
components/libc/compilers/newlib/libc.c → components/libc/compilers/gcc/newlib/libc.c


+ 0 - 0
components/libc/compilers/newlib/libc.h → components/libc/compilers/gcc/newlib/libc.h


+ 0 - 0
components/libc/compilers/newlib/libc_syms.c → components/libc/compilers/gcc/newlib/libc_syms.c


+ 0 - 0
components/libc/compilers/newlib/machine/time.h → components/libc/compilers/gcc/newlib/machine/time.h


+ 0 - 0
components/libc/compilers/newlib/stdio.c → components/libc/compilers/gcc/newlib/stdio.c


+ 1 - 4
components/libc/compilers/newlib/syscalls.c → components/libc/compilers/gcc/newlib/syscalls.c

@@ -85,6 +85,7 @@ void __libc_init_array(void)
 #ifdef RT_USING_LIBC
 #include <reent.h>
 #include <stdio.h>
+#include "libc.h"
 #ifdef RT_USING_DFS
 #include <dfs_posix.h>
 #endif
@@ -92,10 +93,6 @@ void __libc_init_array(void)
 #include <dlmodule.h>
 #endif
 
-#define DBG_TAG    "newlib.syscalls"
-#define DBG_LVL    DBG_INFO
-#include <rtdbg.h>
-
 /* Reentrant versions of system calls.  */
 
 #ifndef _REENT_ONLY

+ 15 - 0
components/libc/compilers/gcc/partial/SConscript

@@ -0,0 +1,15 @@
+# RT-Thread building script for bridge
+
+import os
+from building import *
+
+cwd = GetCurrentDir()
+objs = []
+list = os.listdir(cwd)
+
+for d in list:
+    path = os.path.join(cwd, d)
+    if os.path.isfile(os.path.join(path, 'SConscript')):
+        objs = objs + SConscript(os.path.join(d, 'SConscript'))
+
+Return('objs')

+ 20 - 0
components/libc/compilers/gcc/partial/mips/SConscript

@@ -0,0 +1,20 @@
+from shutil import copy
+from building import *
+
+Import('rtconfig')
+
+src   = []
+cwd   = GetCurrentDir()
+CPPPATH = [cwd]
+group = []
+
+if rtconfig.PLATFORM == 'gcc' and ('mips' in rtconfig.PREFIX): # identify mips gcc tool chain
+    try:
+        # There is no 'sys/select.h' in tthe mips gcc toolchain; it will be copied from 'nogcc/sys/select.h'
+        copy("../../../common/nogcc/sys/select.h", "./sys/select.h")
+    except:
+        pass
+
+    group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH)
+
+Return('group')

+ 4 - 0
components/libc/compilers/gcc/partial/mips/readme.md

@@ -0,0 +1,4 @@
+These files don't exist in the mips gcc toolchain. They will be generated by scons automatically , and **DO NOT** change them:
+
+- sys/select.h
+

+ 0 - 0
components/libc/compilers/common/partial/ls/sys/select.h → components/libc/compilers/gcc/partial/mips/sys/select.h


+ 2 - 0
components/libc/compilers/gcc/partial/readme.md

@@ -0,0 +1,2 @@
+This folder is for some particular targets.
+