diff options
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 8cf85d186f..249a639f8c 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -28,7 +28,10 @@ namespace { } const TargetAsmInfo *PPCTargetMachine::createTargetAsmInfo() const { - return new DarwinTargetAsmInfo(*this); + if (Subtarget.isDarwin()) + return new DarwinTargetAsmInfo(*this); + else + return new LinuxTargetAsmInfo(*this); } unsigned PPC32TargetMachine::getJITMatchQuality() { @@ -90,7 +93,7 @@ PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS, if (Subtarget.isDarwin()) setRelocationModel(Reloc::DynamicNoPIC); else - setRelocationModel(Reloc::PIC_); + setRelocationModel(Reloc::Static); } PPC32TargetMachine::PPC32TargetMachine(const Module &M, const std::string &FS) |