Skip to content

Commit d43a68e

Browse files
authored
Merge pull request #5105 from mysterywolf/part
[libc]新建gcc文件夹,将newlib和partical文件夹并入
2 parents ae49c3f + c806881 commit d43a68e

File tree

23 files changed

+59
-92
lines changed

23 files changed

+59
-92
lines changed

bsp/ls1bdev/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ config PKGS_DIR
1818
source "$RTT_DIR/Kconfig"
1919
source "$PKGS_DIR/Kconfig"
2020

21-
config SOC_LS
22-
bool
23-
default y
24-
2521
config SOC_LS1B
2622
bool
2723
select RT_USING_COMPONENTS_INIT

bsp/ls1cdev/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ source "$RTT_DIR/Kconfig"
1919
source "$RTT_DIR/libcpu/mips/common/Kconfig"
2020
source "$PKGS_DIR/Kconfig"
2121

22-
config SOC_LS
23-
bool
24-
default y
25-
2622
config SOC_LS1C300
2723
bool
2824
select RT_USING_COMPONENTS_INIT

bsp/ls2kdev/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ source "$RTT_DIR/Kconfig"
2222
source "$RTT_DIR/libcpu/mips/common/Kconfig"
2323
source "$PKGS_DIR/Kconfig"
2424

25-
config SOC_LS
26-
bool
27-
default y
28-
2925
config SOC_LS2K1000
3026
bool
3127
select ARCH_MIPS64

components/finsh/msh.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -257,21 +257,6 @@ int msh_exec_module(const char *cmd_line, int size)
257257
rt_free(pg_name);
258258
return ret;
259259
}
260-
261-
int system(const char *command)
262-
{
263-
int ret = -RT_ENOMEM;
264-
char *cmd = rt_strdup(command);
265-
266-
if (cmd)
267-
{
268-
ret = msh_exec(cmd, rt_strlen(cmd));
269-
rt_free(cmd);
270-
}
271-
272-
return ret;
273-
}
274-
RTM_EXPORT(system);
275260
#endif /* defined(RT_USING_MODULE) && defined(RT_USING_DFS) */
276261

277262
static int _msh_exec_cmd(char *cmd, rt_size_t length, int *retp)

components/libc/compilers/armlibc/syscalls.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -319,16 +319,6 @@ int remove(const char *filename)
319319
#endif
320320
}
321321

322-
#if defined(RT_USING_FINSH) && defined(RT_USING_MODULE) && defined(RT_USING_DFS)
323-
/* use system(const char *string) implementation in the msh */
324-
#else
325-
int system(const char *string)
326-
{
327-
extern int __rt_libc_system(const char *string);
328-
return __rt_libc_system(string);
329-
}
330-
#endif
331-
332322
#ifdef __MICROLIB
333323
#include <stdio.h>
334324

components/libc/compilers/common/partial/ls/SConscript

Lines changed: 0 additions & 23 deletions
This file was deleted.

components/libc/compilers/common/partial/ls/readme.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

components/libc/compilers/common/stdlib.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,21 @@ void __rt_libc_exit(int status)
2525
}
2626
}
2727

28-
int __rt_libc_system(const char *string)
29-
{
3028
#ifdef RT_USING_MSH
29+
int system(const char *command)
30+
{
3131
extern int msh_exec(char *cmd, rt_size_t length);
32-
msh_exec((char*)string, rt_strlen(string));
33-
#endif
34-
return 0;
32+
33+
int ret = -RT_ENOMEM;
34+
char *cmd = rt_strdup(command);
35+
36+
if (cmd)
37+
{
38+
ret = msh_exec(cmd, rt_strlen(cmd));
39+
rt_free(cmd);
40+
}
41+
42+
return ret;
3543
}
44+
RTM_EXPORT(system);
45+
#endif

components/libc/compilers/dlib/syscalls.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* Change Logs:
77
* Date Author Notes
88
* 2021-02-13 Meco Man implement exit() and abort()
9-
* 2021-02-20 Meco Man add system()
109
*/
1110
#include <rtthread.h>
1211

@@ -17,9 +16,3 @@ void __exit (int status)
1716
__rt_libc_exit(status);
1817
while(1);
1918
}
20-
21-
int system(const char * string)
22-
{
23-
extern int __rt_libc_system(const char *string);
24-
return __rt_libc_system(string);
25-
}

0 commit comments

Comments
 (0)