Config.h revision 1e3247531134c0f578d0df7ad7f02905bf9e0415
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_DISASSEMBLER_FILE "/tmp/mc-dis.s" 18#else 19#define DEBUG_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_ARM64_CODEGEN) 31 #define PROVIDE_ARM_CODEGEN 32 #define PROVIDE_ARM64_CODEGEN 33 #define DEFAULT_ARM64_CODEGEN 34 35#elif defined(FORCE_MIPS_CODEGEN) 36 #define PROVIDE_MIPS_CODEGEN 37 #define DEFAULT_MIPS_CODEGEN 38 39#elif defined(FORCE_X86_CODEGEN) 40 #define PROVIDE_X86_CODEGEN 41 42 #if defined(__i386__) 43 #define DEFAULT_X86_CODEGEN 44 #elif defined(__x86_64__) 45 #define DEFAULT_X86_64_CODEGEN 46 #endif 47 48#else 49 #define PROVIDE_ARM_CODEGEN 50 #define PROVIDE_ARM64_CODEGEN 51 #define PROVIDE_MIPS_CODEGEN 52 #define PROVIDE_X86_CODEGEN 53 54 #if defined(__arm__) 55 #define DEFAULT_ARM_CODEGEN 56 #elif defined(__arch64__) 57 #define DEFAULT_ARM64_CODEGEN 58 #elif defined(__mips__) 59 #define DEFAULT_MIPS_CODEGEN 60 #elif defined(__i386__) 61 #define DEFAULT_X86_CODEGEN 62 #elif defined(__x86_64__) 63 #define DEFAULT_X86_64_CODEGEN 64 #endif 65#endif 66 67#define DEFAULT_ARM_TRIPLE_STRING "armv7-none-linux-gnueabi" 68#define DEFAULT_THUMB_TRIPLE_STRING "thumbv7-none-linux-gnueabi" 69#define DEFAULT_ARM64_TRIPLE_STRING "aarch64-none-linux-gnueabi" 70#define DEFAULT_MIPS_TRIPLE_STRING "mipsel-none-linux-gnueabi" 71#define DEFAULT_X86_TRIPLE_STRING "i686-unknown-linux" 72#define DEFAULT_X86_64_TRIPLE_STRING "x86_64-unknown-linux" 73 74#if defined(DEFAULT_ARM_CODEGEN) 75 #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_ARM_TRIPLE_STRING 76#elif defined(DEFAULT_ARM64_CODEGEN) 77 #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_ARM64_TRIPLE_STRING 78#elif defined(DEFAULT_MIPS_CODEGEN) 79 #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_MIPS_TRIPLE_STRING 80#elif defined(DEFAULT_X86_CODEGEN) 81 #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_X86_TRIPLE_STRING 82#elif defined(DEFAULT_X86_64_CODEGEN) 83 #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_X86_64_TRIPLE_STRING 84#endif 85 86#if (defined(__VFP_FP__) && !defined(__SOFTFP__)) 87 #define ARM_USE_VFP 88#endif 89 90//--------------------------------------------------------------------------- 91 92#endif // BCC_CONFIG_CONFIG_H 93