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