Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 1 | #ifndef BCC_CONFIG_H |
| 2 | #define BCC_CONFIG_H |
| 3 | |
Logan Chien | eb56784 | 2011-07-14 19:58:42 +0800 | [diff] [blame] | 4 | #include "ConfigFromMk.h" |
| 5 | |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 6 | //--------------------------------------------------------------------------- |
Logan Chien | 4885cf8 | 2011-07-20 10:18:05 +0800 | [diff] [blame] | 7 | // Configuration for Disassembler |
Logan | 1dc6314 | 2011-02-25 17:14:51 +0800 | [diff] [blame] | 8 | //--------------------------------------------------------------------------- |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 9 | |
Stephen Hines | 3699962 | 2012-03-11 19:15:51 -0700 | [diff] [blame] | 10 | #if DEBUG_MC_DISASSEMBLER |
Logan Chien | 4885cf8 | 2011-07-20 10:18:05 +0800 | [diff] [blame] | 11 | #define USE_DISASSEMBLER 1 |
| 12 | #else |
| 13 | #define USE_DISASSEMBLER 0 |
| 14 | #endif |
| 15 | |
Andrew Hsieh | 1704c74 | 2011-11-20 20:43:36 -0800 | [diff] [blame] | 16 | #if defined(__HOST__) |
Stephen Hines | 3699962 | 2012-03-11 19:15:51 -0700 | [diff] [blame] | 17 | #define DEBUG_MC_DISASSEMBLER_FILE "/tmp/mc-dis.s" |
Andrew Hsieh | 1704c74 | 2011-11-20 20:43:36 -0800 | [diff] [blame] | 18 | #else |
Stephen Hines | 3699962 | 2012-03-11 19:15:51 -0700 | [diff] [blame] | 19 | #define DEBUG_MC_DISASSEMBLER_FILE "/data/local/tmp/mc-dis.s" |
Andrew Hsieh | 1704c74 | 2011-11-20 20:43:36 -0800 | [diff] [blame] | 20 | #endif // defined(__HOST__) |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 21 | |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 22 | //--------------------------------------------------------------------------- |
Logan | 1dc6314 | 2011-02-25 17:14:51 +0800 | [diff] [blame] | 23 | // Configuration for CodeGen and CompilerRT |
| 24 | //--------------------------------------------------------------------------- |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 25 | |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 26 | #if defined(FORCE_ARM_CODEGEN) |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 27 | #define PROVIDE_ARM_CODEGEN |
Logan Chien | 3bb7707 | 2011-09-17 16:53:53 +0800 | [diff] [blame] | 28 | #define DEFAULT_ARM_CODEGEN |
| 29 | |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 30 | #elif defined(FORCE_MIPS_CODEGEN) |
| 31 | #define PROVIDE_MIPS_CODEGEN |
| 32 | #define DEFAULT_MIPS_CODEGEN |
| 33 | |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 34 | #elif defined(FORCE_X86_CODEGEN) |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 35 | #define PROVIDE_X86_CODEGEN |
Logan Chien | 3bb7707 | 2011-09-17 16:53:53 +0800 | [diff] [blame] | 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 |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 45 | #define PROVIDE_MIPS_CODEGEN |
Logan Chien | 3bb7707 | 2011-09-17 16:53:53 +0800 | [diff] [blame] | 46 | #define PROVIDE_X86_CODEGEN |
| 47 | |
| 48 | #if defined(__arm__) |
| 49 | #define DEFAULT_ARM_CODEGEN |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 50 | #elif defined(__mips__) |
| 51 | #define DEFAULT_MIPS_CODEGEN |
Logan Chien | 3bb7707 | 2011-09-17 16:53:53 +0800 | [diff] [blame] | 52 | #elif defined(__i386__) |
| 53 | #define DEFAULT_X86_CODEGEN |
| 54 | #elif defined(__x86_64__) |
| 55 | #define DEFAULT_X86_64_CODEGEN |
| 56 | #endif |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 57 | #endif |
| 58 | |
| 59 | #if defined(DEFAULT_ARM_CODEGEN) |
Andrew Hsieh | 998ec83 | 2011-11-21 02:36:11 -0800 | [diff] [blame] | 60 | #define DEFAULT_TARGET_TRIPLE_STRING "armv7-none-linux-gnueabi" |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 61 | #elif defined(DEFAULT_MIPS_CODEGEN) |
| 62 | #define DEFAULT_TARGET_TRIPLE_STRING "mipsel-none-linux-gnueabi" |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 63 | #elif defined(DEFAULT_X86_CODEGEN) |
Andrew Hsieh | 998ec83 | 2011-11-21 02:36:11 -0800 | [diff] [blame] | 64 | #define DEFAULT_TARGET_TRIPLE_STRING "i686-unknown-linux" |
Logan Chien | 3bb7707 | 2011-09-17 16:53:53 +0800 | [diff] [blame] | 65 | #elif defined(DEFAULT_X86_64_CODEGEN) |
Andrew Hsieh | 998ec83 | 2011-11-21 02:36:11 -0800 | [diff] [blame] | 66 | #define DEFAULT_TARGET_TRIPLE_STRING "x86_64-unknown-linux" |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 67 | #endif |
| 68 | |
| 69 | #if (defined(__VFP_FP__) && !defined(__SOFTFP__)) |
| 70 | #define ARM_USE_VFP |
| 71 | #endif |
| 72 | |
| 73 | //--------------------------------------------------------------------------- |
| 74 | |
| 75 | #endif // BCC_CONFIG_H |