Config.h revision c72c4ddfcd79c74f70713da91a69569451b5c19e
1#ifndef BCC_CONFIG_CONFIG_H
2#define BCC_CONFIG_CONFIG_H
3
4#include "ConfigFromMk.h"
5
6//---------------------------------------------------------------------------
7// Configuration for Disassembler
8//---------------------------------------------------------------------------
9
10#if DEBUG_MC_DISASSEMBLER
11#define USE_DISASSEMBLER 1
12#else
13#define USE_DISASSEMBLER 0
14#endif
15
16#if defined(__HOST__)
17#define DEBUG_MC_DISASSEMBLER_FILE "/tmp/mc-dis.s"
18#else
19#define DEBUG_MC_DISASSEMBLER_FILE "/data/local/tmp/mc-dis.s"
20#endif // defined(__HOST__)
21
22//---------------------------------------------------------------------------
23// Configuration for CodeGen and CompilerRT
24//---------------------------------------------------------------------------
25
26#if defined(FORCE_ARM_CODEGEN)
27  #define PROVIDE_ARM_CODEGEN
28  #define DEFAULT_ARM_CODEGEN
29
30#elif defined(FORCE_MIPS_CODEGEN)
31  #define PROVIDE_MIPS_CODEGEN
32  #define DEFAULT_MIPS_CODEGEN
33
34#elif defined(FORCE_X86_CODEGEN)
35  #define PROVIDE_X86_CODEGEN
36
37  #if defined(__i386__)
38    #define DEFAULT_X86_CODEGEN
39  #elif defined(__x86_64__)
40    #define DEFAULT_X86_64_CODEGEN
41  #endif
42
43#else
44  #define PROVIDE_ARM_CODEGEN
45  #define PROVIDE_MIPS_CODEGEN
46  #define PROVIDE_X86_CODEGEN
47
48  #if defined(__arm__)
49    #define DEFAULT_ARM_CODEGEN
50  #elif defined(__mips__)
51    #define DEFAULT_MIPS_CODEGEN
52  #elif defined(__i386__)
53    #define DEFAULT_X86_CODEGEN
54  #elif defined(__x86_64__)
55    #define DEFAULT_X86_64_CODEGEN
56  #endif
57#endif
58
59#define DEFAULT_ARM_TRIPLE_STRING      "armv7-none-linux-gnueabi"
60#define DEFAULT_MIPS_TRIPLE_STRING     "mipsel-none-linux-gnueabi"
61#define DEFAULT_X86_TRIPLE_STRING      "i686-unknown-linux"
62#define DEFAULT_X86_64_TRIPLE_STRING   "x86_64-unknown-linux"
63
64#if defined(DEFAULT_ARM_CODEGEN)
65  #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_ARM_TRIPLE_STRING
66#elif defined(DEFAULT_MIPS_CODEGEN)
67  #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_MIPS_TRIPLE_STRING
68#elif defined(DEFAULT_X86_CODEGEN)
69  #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_X86_TRIPLE_STRING
70#elif defined(DEFAULT_X86_64_CODEGEN)
71  #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_X86_64_TRIPLE_STRING
72#endif
73
74#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
75  #define ARM_USE_VFP
76#endif
77
78//---------------------------------------------------------------------------
79
80#endif // BCC_CONFIG_CONFIG_H
81