增加 __GNUC__宏定义 和sconscript的平台识别以避免重复定义
This commit is contained in:
parent
0607ff84ab
commit
ff097f0467
|
@ -16,6 +16,7 @@ else:
|
|||
if GetDepend('RT_USING_POSIX') == False:
|
||||
SrcRemove(src, ['unistd.c'])
|
||||
|
||||
group = DefineGroup('libc', src, depend = [''], CPPPATH = CPPPATH)
|
||||
if not GetDepend('RT_USING_MINILIBC') and GetDepend('RT_USING_LIBC'):
|
||||
group = DefineGroup('libc', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
|
|
|
@ -8,7 +8,7 @@ group = []
|
|||
CPPPATH = [cwd]
|
||||
CPPDEFINES = ['RT_USING_MINILIBC']
|
||||
|
||||
if rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim' and not GetDepend('RT_USING_LIBC'):
|
||||
if rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim' and not GetDepend('RT_USING_LIBC') and GetDepend('RT_USING_MINILIBC'):
|
||||
group = DefineGroup('libc', src, depend = [''],
|
||||
CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <rtconfig.h>
|
||||
|
||||
#if defined(RT_USING_NEWLIB) || defined(_WIN32)
|
||||
#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined( __GNUC__ )
|
||||
/* use errno.h file in toolchains */
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
@ -45,7 +45,7 @@ defined in armcc/errno.h
|
|||
#define ERROR_BASE_NO 0
|
||||
#endif
|
||||
|
||||
#if !defined(RT_USING_NEWLIB) && !defined(_WIN32)
|
||||
#if !defined(RT_USING_NEWLIB) && !defined(_WIN32) && !defined(__GNUC__ )
|
||||
|
||||
#define EPERM (ERROR_BASE_NO + 1)
|
||||
#define ENOENT (ERROR_BASE_NO + 2)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#ifndef LIBC_FCNTL_H__
|
||||
#define LIBC_FCNTL_H__
|
||||
|
||||
#if defined(RT_USING_NEWLIB) || defined(_WIN32)
|
||||
#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined( __GNUC__ )
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifndef O_NONBLOCK
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <rtconfig.h>
|
||||
|
||||
#if defined(RT_USING_NEWLIB) || defined(_WIN32)
|
||||
#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined( __GNUC__ )
|
||||
#include <sys/types.h>
|
||||
#if defined(HAVE_SYS_SELECT_H)
|
||||
#include <sys/select.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <rtconfig.h>
|
||||
|
||||
#if defined(RT_USING_NEWLIB)
|
||||
#if defined(RT_USING_NEWLIB) || defined( __GNUC__ )
|
||||
/* use header file of newlib */
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue