summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2011-02-07 11:35:20 -0800
committerKenny Root <kroot@google.com>2011-02-07 20:51:39 -0800
commit1077c330eed643485d5bc2852abea1fb41bac5fb (patch)
tree471c8d9ecc459d3ff9100023bf6e84889af2cf8f /device
parentcfb9e3db360f9161eede09766fadb2cb178771cb (diff)
downloadexternal_llvm-1077c330eed643485d5bc2852abea1fb41bac5fb.zip
external_llvm-1077c330eed643485d5bc2852abea1fb41bac5fb.tar.gz
external_llvm-1077c330eed643485d5bc2852abea1fb41bac5fb.tar.bz2
Fix X86 target build
Change some definitions in the .def files to allow the targeting of ARM or X86. Fix a typo in the previously submitted Makefile. Add the include for <ctype.h> to use toupper() Change-Id: Ibb9bea6566d47f1d1854fea18d09287fdd36048b
Diffstat (limited to 'device')
-rw-r--r--device/include/llvm/Config/AsmParsers.def8
-rw-r--r--device/include/llvm/Config/AsmPrinters.def8
-rw-r--r--device/include/llvm/Config/Disassemblers.def8
-rw-r--r--device/include/llvm/Config/Targets.def8
-rw-r--r--device/include/llvm/Config/config.h16
5 files changed, 42 insertions, 6 deletions
diff --git a/device/include/llvm/Config/AsmParsers.def b/device/include/llvm/Config/AsmParsers.def
index d009351..45903a4 100644
--- a/device/include/llvm/Config/AsmParsers.def
+++ b/device/include/llvm/Config/AsmParsers.def
@@ -24,6 +24,12 @@
# error Please define the macro LLVM_ASM_PARSER(TargetName)
#endif
-LLVM_ASM_PARSER(ARM)
+#if defined(__arm__)
+ LLVM_ASM_PARSER(ARM)
+#elif defined(__i386__)
+ LLVM_ASM_PARSER(X86)
+#else
+# error Unsupported TARGET_ARCH for LLVM_ASM_PARSER
+#endif
#undef LLVM_ASM_PARSER
diff --git a/device/include/llvm/Config/AsmPrinters.def b/device/include/llvm/Config/AsmPrinters.def
index 6706bd3..b7311ba 100644
--- a/device/include/llvm/Config/AsmPrinters.def
+++ b/device/include/llvm/Config/AsmPrinters.def
@@ -24,6 +24,12 @@
# error Please define the macro LLVM_ASM_PRINTER(TargetName)
#endif
-LLVM_ASM_PRINTER(ARM)
+#if defined(__arm__)
+ LLVM_ASM_PRINTER(ARM)
+#elif defined(__i386__)
+ LLVM_ASM_PRINTER(X86)
+#else
+# error Unsupported TARGET_ARCH for LLVM_ASM_PRINTER
+#endif
#undef LLVM_ASM_PRINTER
diff --git a/device/include/llvm/Config/Disassemblers.def b/device/include/llvm/Config/Disassemblers.def
index d663c61..39df62e 100644
--- a/device/include/llvm/Config/Disassemblers.def
+++ b/device/include/llvm/Config/Disassemblers.def
@@ -24,6 +24,12 @@
# error Please define the macro LLVM_DISASSEMBLER(TargetName)
#endif
-LLVM_DISASSEMBLER(ARM)
+#if defined(__arm__)
+ LLVM_DISASSEMBLER(ARM)
+#elif defined(__i386__)
+ LLVM_DISASSEMBLER(X86)
+#else
+# error Unsupported TARGET_ARCH for LLVM_DISASSEMBLER
+#endif
#undef LLVM_DISASSEMBLER
diff --git a/device/include/llvm/Config/Targets.def b/device/include/llvm/Config/Targets.def
index c50df96..4094606 100644
--- a/device/include/llvm/Config/Targets.def
+++ b/device/include/llvm/Config/Targets.def
@@ -23,6 +23,12 @@
# error Please define the macro LLVM_TARGET(TargetName)
#endif
-LLVM_TARGET(ARM)
+#if defined(__arm__)
+ LLVM_TARGET(ARM)
+#elif defined(__i386__)
+ LLVM_TARGET(X86)
+#else
+# error Unsupported TARGET_ARCH for LLVM_ASM_PRINTER
+#endif
#undef LLVM_TARGET
diff --git a/device/include/llvm/Config/config.h b/device/include/llvm/Config/config.h
index d5cdab5..06f29f4 100644
--- a/device/include/llvm/Config/config.h
+++ b/device/include/llvm/Config/config.h
@@ -496,10 +496,22 @@
/* #undef LLVM_MULTITHREADED */
/* LLVM architecture name for the native architecture, if available */
-#define LLVM_NATIVE_ARCH ARMTarget
+#if defined(__arm__)
+# define LLVM_NATIVE_ARCH ARMTarget
+#elif defined(__i386__)
+# define LLVM_NATIVE_ARCH X86Target
+#else
+# error Unsupported target architecture for LLVM_NATIVE_ARCH
+#endif
/* Short LLVM architecture name for the native architecture, if available */
-#define LLVM_NATIVE_ARCHNAME ARM
+#if defined(__arm__)
+# define LLVM_NATIVE_ARCHNAME ARM
+#elif defined(__i386__)
+# define LLVM_NATIVE_ARCHNAME X86
+#else
+# error Unsupported target architecture for LLVM_NATIVE_ARCHNAME
+#endif
/* Define if this is Unixish platform */
#define LLVM_ON_UNIX 1