OSDN Git Service

0678e91d14b3d83b7e1cb1425fe4b53aea150111
[pf3gnuchains/gcc-fork.git] / gcc / config / bfin / uclinux.h
1 /* The GNU C++ standard library requires that these macros be defined.  */
2 #undef CPLUSPLUS_CPP_SPEC
3 #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
4
5 #undef  STARTFILE_SPEC
6 #define STARTFILE_SPEC \
7   "%{!shared: crt1%O%s} crti%O%s crtbegin%O%s crtlibid%O%s"
8
9 #undef  ENDFILE_SPEC
10 #define ENDFILE_SPEC \
11   "crtend%O%s crtn%O%s"
12
13 #undef  LIB_SPEC
14 #define LIB_SPEC "%{pthread:-lpthread} -lc"
15
16 #ifdef __BFIN_FDPIC__
17 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)      \
18 asm (SECTION_OP); \
19 asm ("P3 = [SP + 20];\n\tcall " USER_LABEL_PREFIX #FUNC ";"); \
20 asm (TEXT_SECTION_ASM_OP);
21 #endif
22
23 #define NO_IMPLICIT_EXTERN_C
24
25 #define LINUX_TARGET_OS_CPP_BUILTINS()                          \
26     do {                                                        \
27         builtin_define ("__gnu_linux__");                       \
28         builtin_define_std ("linux");                           \
29         builtin_define_std ("unix");                            \
30         builtin_assert ("system=linux");                        \
31         builtin_assert ("system=unix");                         \
32         builtin_assert ("system=posix");                        \
33     } while (0)
34
35 #define TARGET_OS_CPP_BUILTINS()                \
36   do                                            \
37     {                                           \
38         LINUX_TARGET_OS_CPP_BUILTINS();         \
39         if (flag_pic)                           \
40           {                                     \
41             builtin_define ("__PIC__");         \
42             builtin_define ("__pic__");         \
43           }                                     \
44     }                                           \
45   while (0)