blob: 34edf22345ade1dc55d7884357ad205d09a259d9 [file] [log] [blame]
From 21b4a36988a3cd59fb40615eaec6d468d5045a1f Mon Sep 17 00:00:00 2001
From: Andrew Hsieh <andrewhsieh@google.com>
Date: Tue, 19 Mar 2013 10:35:10 -0700
Subject: [PATCH 2/5] Compile agsint llvm 3.2
Current mclinker needs LLVM -r 173175 which contains re-org of
some headers from since LLVM 3.2. This patch is to roll back
so we can build from LLVM 3.2
Change-Id: Iea929ae893269a6f7d5293e20b9641c917ec920b
---
configure.ac | 2 +-
lib/CodeGen/MCLDTargetMachine.cpp | 2 +-
lib/CodeGen/MCLinker.cpp | 2 +-
lib/Target/X86/X86Emulation.cpp | 3 +--
lib/Target/X86/X86LDBackend.cpp | 3 +--
tools/llvm-mcld/llvm-mcld.cpp | 6 +++---
6 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index c56d333..70fecd4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,7 +101,7 @@ AC_CHECK_HEADERS([sys/mman.h])
####################
# Configure LLVM
-CHECK_LLVM([3.3])
+CHECK_LLVM([3.2])
ENUM_MCLD_TARGETS
CHECK_ALONE_TARGET
diff --git a/lib/CodeGen/MCLDTargetMachine.cpp b/lib/CodeGen/MCLDTargetMachine.cpp
index 57da5b5..9afadad 100644
--- a/lib/CodeGen/MCLDTargetMachine.cpp
+++ b/lib/CodeGen/MCLDTargetMachine.cpp
@@ -26,7 +26,7 @@
#include <llvm/CodeGen/MachineModuleInfo.h>
#include <llvm/CodeGen/GCStrategy.h>
#include <llvm/CodeGen/Passes.h>
-#include <llvm/IR/DataLayout.h>
+#include <llvm/DataLayout.h>
#include <llvm/MC/MCAsmInfo.h>
#include <llvm/MC/MCStreamer.h>
#include <llvm/MC/MCInstrInfo.h>
diff --git a/lib/CodeGen/MCLinker.cpp b/lib/CodeGen/MCLinker.cpp
index 3613a03..909278f 100644
--- a/lib/CodeGen/MCLinker.cpp
+++ b/lib/CodeGen/MCLinker.cpp
@@ -28,7 +28,7 @@
#include <mcld/Support/raw_ostream.h>
#include <mcld/Support/MemoryArea.h>
-#include <llvm/IR/Module.h>
+#include <llvm/Module.h>
#include <llvm/Support/CommandLine.h>
#include <algorithm>
diff --git a/lib/Target/X86/X86Emulation.cpp b/lib/Target/X86/X86Emulation.cpp
index 753d7cc..1e17b03 100644
--- a/lib/Target/X86/X86Emulation.cpp
+++ b/lib/Target/X86/X86Emulation.cpp
@@ -23,8 +23,7 @@ static bool MCLDEmulateX86ELF(LinkerConfig& pConfig)
unsigned int bitclass;
Triple::ArchType arch = pConfig.targets().triple().getArch();
assert (arch == Triple::x86 || arch == Triple::x86_64);
- if (arch == Triple::x86 ||
- pConfig.targets().triple().getEnvironment() == Triple::GNUX32) {
+ if (arch == Triple::x86) {
bitclass = 32;
}
else {
diff --git a/lib/Target/X86/X86LDBackend.cpp b/lib/Target/X86/X86LDBackend.cpp
index 87c1192..4001170 100644
--- a/lib/Target/X86/X86LDBackend.cpp
+++ b/lib/Target/X86/X86LDBackend.cpp
@@ -46,8 +46,7 @@ X86GNULDBackend::X86GNULDBackend(const LinkerConfig& pConfig,
{
Triple::ArchType arch = pConfig.targets().triple().getArch();
assert (arch == Triple::x86 || arch == Triple::x86_64);
- if (arch == Triple::x86 ||
- pConfig.targets().triple().getEnvironment() == Triple::GNUX32) {
+ if (arch == Triple::x86) {
m_RelEntrySize = 8;
m_RelaEntrySize = 12;
if (arch == Triple::x86)
diff --git a/tools/llvm-mcld/llvm-mcld.cpp b/tools/llvm-mcld/llvm-mcld.cpp
index 7a3a0c4..98bdcad 100644
--- a/tools/llvm-mcld/llvm-mcld.cpp
+++ b/tools/llvm-mcld/llvm-mcld.cpp
@@ -25,9 +25,9 @@
#include <llvm/PassManager.h>
#include <llvm/Pass.h>
-#include <llvm/IR/Module.h>
-#include <llvm/IR/DataLayout.h>
-#include <llvm/IR/LLVMContext.h>
+#include <llvm/Module.h>
+#include <llvm/DataLayout.h>
+#include <llvm/LLVMContext.h>
#include <llvm/ADT/Triple.h>
#include <llvm/ADT/StringSwitch.h>
#include <llvm/MC/SubtargetFeature.h>
--
1.8.1.3