summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-09-27 14:43:31 -0400
committerMeco Man <[email protected]>2021-09-27 16:40:12 -0400
commit8b17d53da73289a368a47f798a9275aea3e50d86 (patch)
tree083852cde19d66f58c5a6857d4ab2ca4fc37f642
parent4c1c946ba3956861e5aa818f9df3c0938b311eba (diff)
[libc]新建gcc文件夹,将newlib和partical文件夹并入
-rw-r--r--bsp/ls1bdev/Kconfig4
-rw-r--r--bsp/ls1cdev/Kconfig4
-rw-r--r--bsp/ls2kdev/Kconfig4
-rw-r--r--components/libc/compilers/common/partial/ls/SConscript23
-rw-r--r--components/libc/compilers/common/partial/ls/readme.md9
-rw-r--r--components/libc/compilers/gcc/SConscript (renamed from components/libc/compilers/common/partial/SConscript)0
-rw-r--r--components/libc/compilers/gcc/newlib/README.md (renamed from components/libc/compilers/newlib/README.md)3
-rw-r--r--components/libc/compilers/gcc/newlib/SConscript (renamed from components/libc/compilers/newlib/SConscript)0
-rw-r--r--components/libc/compilers/gcc/newlib/libc.c (renamed from components/libc/compilers/newlib/libc.c)0
-rw-r--r--components/libc/compilers/gcc/newlib/libc.h (renamed from components/libc/compilers/newlib/libc.h)0
-rw-r--r--components/libc/compilers/gcc/newlib/libc_syms.c (renamed from components/libc/compilers/newlib/libc_syms.c)0
-rw-r--r--components/libc/compilers/gcc/newlib/machine/time.h (renamed from components/libc/compilers/newlib/machine/time.h)0
-rw-r--r--components/libc/compilers/gcc/newlib/stdio.c (renamed from components/libc/compilers/newlib/stdio.c)0
-rw-r--r--components/libc/compilers/gcc/newlib/syscalls.c (renamed from components/libc/compilers/newlib/syscalls.c)5
-rw-r--r--components/libc/compilers/gcc/partial/SConscript15
-rw-r--r--components/libc/compilers/gcc/partial/mips/SConscript20
-rw-r--r--components/libc/compilers/gcc/partial/mips/readme.md4
-rw-r--r--components/libc/compilers/gcc/partial/mips/sys/select.h (renamed from components/libc/compilers/common/partial/ls/sys/select.h)0
-rw-r--r--components/libc/compilers/gcc/partial/readme.md2
19 files changed, 44 insertions, 49 deletions
diff --git a/bsp/ls1bdev/Kconfig b/bsp/ls1bdev/Kconfig
index c9196af29d..b02aee337a 100644
--- a/bsp/ls1bdev/Kconfig
+++ b/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
diff --git a/bsp/ls1cdev/Kconfig b/bsp/ls1cdev/Kconfig
index 59f7c43323..3fb6e3bbdf 100644
--- a/bsp/ls1cdev/Kconfig
+++ b/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
diff --git a/bsp/ls2kdev/Kconfig b/bsp/ls2kdev/Kconfig
index 57dd99e53a..fc2dfe1328 100644
--- a/bsp/ls2kdev/Kconfig
+++ b/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
diff --git a/components/libc/compilers/common/partial/ls/SConscript b/components/libc/compilers/common/partial/ls/SConscript
deleted file mode 100644
index 2665bee078..0000000000
--- a/components/libc/compilers/common/partial/ls/SConscript
+++ /dev/null
@@ -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')
diff --git a/components/libc/compilers/common/partial/ls/readme.md b/components/libc/compilers/common/partial/ls/readme.md
deleted file mode 100644
index fa68e1e84a..0000000000
--- a/components/libc/compilers/common/partial/ls/readme.md
+++ /dev/null
@@ -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 \ No newline at end of file
diff --git a/components/libc/compilers/common/partial/SConscript b/components/libc/compilers/gcc/SConscript
index 4c815c49b8..4c815c49b8 100644
--- a/components/libc/compilers/common/partial/SConscript
+++ b/components/libc/compilers/gcc/SConscript
diff --git a/components/libc/compilers/newlib/README.md b/components/libc/compilers/gcc/newlib/README.md
index 385f329a4f..62172e6a55 100644
--- a/components/libc/compilers/newlib/README.md
+++ b/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 \ No newline at end of file
+https://sourceware.org/newlib/libc.html#Reentrancy
+
diff --git a/components/libc/compilers/newlib/SConscript b/components/libc/compilers/gcc/newlib/SConscript
index cef546e17c..cef546e17c 100644
--- a/components/libc/compilers/newlib/SConscript
+++ b/components/libc/compilers/gcc/newlib/SConscript
diff --git a/components/libc/compilers/newlib/libc.c b/components/libc/compilers/gcc/newlib/libc.c
index 9834a9a015..9834a9a015 100644
--- a/components/libc/compilers/newlib/libc.c
+++ b/components/libc/compilers/gcc/newlib/libc.c
diff --git a/components/libc/compilers/newlib/libc.h b/components/libc/compilers/gcc/newlib/libc.h
index c470698aa6..c470698aa6 100644
--- a/components/libc/compilers/newlib/libc.h
+++ b/components/libc/compilers/gcc/newlib/libc.h
diff --git a/components/libc/compilers/newlib/libc_syms.c b/components/libc/compilers/gcc/newlib/libc_syms.c
index aaf6980d6b..aaf6980d6b 100644
--- a/components/libc/compilers/newlib/libc_syms.c
+++ b/components/libc/compilers/gcc/newlib/libc_syms.c
diff --git a/components/libc/compilers/newlib/machine/time.h b/components/libc/compilers/gcc/newlib/machine/time.h
index ff754d2473..ff754d2473 100644
--- a/components/libc/compilers/newlib/machine/time.h
+++ b/components/libc/compilers/gcc/newlib/machine/time.h
diff --git a/components/libc/compilers/newlib/stdio.c b/components/libc/compilers/gcc/newlib/stdio.c
index baccafad87..baccafad87 100644
--- a/components/libc/compilers/newlib/stdio.c
+++ b/components/libc/compilers/gcc/newlib/stdio.c
diff --git a/components/libc/compilers/newlib/syscalls.c b/components/libc/compilers/gcc/newlib/syscalls.c
index 4c1dc82ad3..8b7ff9efdb 100644
--- a/components/libc/compilers/newlib/syscalls.c
+++ b/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
diff --git a/components/libc/compilers/gcc/partial/SConscript b/components/libc/compilers/gcc/partial/SConscript
new file mode 100644
index 0000000000..4c815c49b8
--- /dev/null
+++ b/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')
diff --git a/components/libc/compilers/gcc/partial/mips/SConscript b/components/libc/compilers/gcc/partial/mips/SConscript
new file mode 100644
index 0000000000..7651233d46
--- /dev/null
+++ b/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')
diff --git a/components/libc/compilers/gcc/partial/mips/readme.md b/components/libc/compilers/gcc/partial/mips/readme.md
new file mode 100644
index 0000000000..a3eeb06c5d
--- /dev/null
+++ b/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
+
diff --git a/components/libc/compilers/common/partial/ls/sys/select.h b/components/libc/compilers/gcc/partial/mips/sys/select.h
index 575ad3a1b5..575ad3a1b5 100644
--- a/components/libc/compilers/common/partial/ls/sys/select.h
+++ b/components/libc/compilers/gcc/partial/mips/sys/select.h
diff --git a/components/libc/compilers/gcc/partial/readme.md b/components/libc/compilers/gcc/partial/readme.md
new file mode 100644
index 0000000000..959fc29f35
--- /dev/null
+++ b/components/libc/compilers/gcc/partial/readme.md
@@ -0,0 +1,2 @@
+This folder is for some particular targets.
+