blob: 3c29c60849ca2d80f1c2569b6ff2d80269fc69de [file] [log] [blame]
Stephen Hines2f6a4932012-05-03 12:27:13 -07001#ifndef BCC_CONFIG_H
2#define BCC_CONFIG_H
Logan35849002011-01-15 07:30:43 +08003
Shih-wei Liaod2068d42012-04-25 01:44:34 -07004#ifdef HAVE_BCC_CONFIG_MK_H
Logan Chieneb567842011-07-14 19:58:42 +08005#include "ConfigFromMk.h"
Shih-wei Liaod2068d42012-04-25 01:44:34 -07006#endif
Logan Chieneb567842011-07-14 19:58:42 +08007
Logan35849002011-01-15 07:30:43 +08008//---------------------------------------------------------------------------
Logan Chien4885cf82011-07-20 10:18:05 +08009// Configuration for Disassembler
Logan1dc63142011-02-25 17:14:51 +080010//---------------------------------------------------------------------------
Logan35849002011-01-15 07:30:43 +080011
Stephen Hines36999622012-03-11 19:15:51 -070012#if DEBUG_MC_DISASSEMBLER
Logan Chien4885cf82011-07-20 10:18:05 +080013#define USE_DISASSEMBLER 1
14#else
15#define USE_DISASSEMBLER 0
16#endif
17
Andrew Hsieh1704c742011-11-20 20:43:36 -080018#if defined(__HOST__)
Stephen Hines36999622012-03-11 19:15:51 -070019#define DEBUG_MC_DISASSEMBLER_FILE "/tmp/mc-dis.s"
Andrew Hsieh1704c742011-11-20 20:43:36 -080020#else
Stephen Hines36999622012-03-11 19:15:51 -070021#define DEBUG_MC_DISASSEMBLER_FILE "/data/local/tmp/mc-dis.s"
Andrew Hsieh1704c742011-11-20 20:43:36 -080022#endif // defined(__HOST__)
Logan35849002011-01-15 07:30:43 +080023
Logan35849002011-01-15 07:30:43 +080024//---------------------------------------------------------------------------
Logan1dc63142011-02-25 17:14:51 +080025// Configuration for CodeGen and CompilerRT
26//---------------------------------------------------------------------------
Logan35849002011-01-15 07:30:43 +080027
Logan35849002011-01-15 07:30:43 +080028#if defined(FORCE_ARM_CODEGEN)
Logan35849002011-01-15 07:30:43 +080029 #define PROVIDE_ARM_CODEGEN
Logan Chien3bb77072011-09-17 16:53:53 +080030 #define DEFAULT_ARM_CODEGEN
31
Logan Chien21392f02011-11-26 20:32:01 +080032#elif defined(FORCE_MIPS_CODEGEN)
33 #define PROVIDE_MIPS_CODEGEN
34 #define DEFAULT_MIPS_CODEGEN
35
Logan35849002011-01-15 07:30:43 +080036#elif defined(FORCE_X86_CODEGEN)
Logan35849002011-01-15 07:30:43 +080037 #define PROVIDE_X86_CODEGEN
Logan Chien3bb77072011-09-17 16:53:53 +080038
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 Chien21392f02011-11-26 20:32:01 +080047 #define PROVIDE_MIPS_CODEGEN
Logan Chien3bb77072011-09-17 16:53:53 +080048 #define PROVIDE_X86_CODEGEN
49
50 #if defined(__arm__)
51 #define DEFAULT_ARM_CODEGEN
Logan Chien21392f02011-11-26 20:32:01 +080052 #elif defined(__mips__)
53 #define DEFAULT_MIPS_CODEGEN
Logan Chien3bb77072011-09-17 16:53:53 +080054 #elif defined(__i386__)
55 #define DEFAULT_X86_CODEGEN
56 #elif defined(__x86_64__)
57 #define DEFAULT_X86_64_CODEGEN
58 #endif
Logan35849002011-01-15 07:30:43 +080059#endif
60
Zonr Chang8b2c3e72012-04-12 15:34:58 +080061#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
Logan35849002011-01-15 07:30:43 +080066#if defined(DEFAULT_ARM_CODEGEN)
Zonr Chang8b2c3e72012-04-12 15:34:58 +080067 #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_ARM_TRIPLE_STRING
Logan Chien21392f02011-11-26 20:32:01 +080068#elif defined(DEFAULT_MIPS_CODEGEN)
Zonr Chang8b2c3e72012-04-12 15:34:58 +080069 #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_MIPS_TRIPLE_STRING
Logan35849002011-01-15 07:30:43 +080070#elif defined(DEFAULT_X86_CODEGEN)
Zonr Chang8b2c3e72012-04-12 15:34:58 +080071 #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_X86_TRIPLE_STRING
Logan Chien3bb77072011-09-17 16:53:53 +080072#elif defined(DEFAULT_X86_64_CODEGEN)
Zonr Chang8b2c3e72012-04-12 15:34:58 +080073 #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_X86_64_TRIPLE_STRING
Logan35849002011-01-15 07:30:43 +080074#endif
75
76#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
77 #define ARM_USE_VFP
78#endif
79
80//---------------------------------------------------------------------------
81
Stephen Hines2f6a4932012-05-03 12:27:13 -070082#endif // BCC_CONFIG_H