the latest assembler that runs on powerpc 10.4 machines doesn't

support aligned comm.  Detect when compiling for 10.4 and don't
emit an alignment for comm.  THis will hopefully fix PR8198.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114817 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-09-27 06:44:54 +00:00
parent 80945784f9
commit 8048ebe91d
6 changed files with 40 additions and 2 deletions

View File

@ -33,6 +33,7 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Triple.h"
using namespace llvm;
using namespace dwarf;
@ -450,6 +451,19 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
IsFunctionEHSymbolGlobal = true;
IsFunctionEHFrameSymbolPrivate = false;
SupportsWeakOmittedEHFrame = false;
Triple T(((LLVMTargetMachine&)TM).getTargetTriple());
if (T.getOS() == Triple::Darwin) {
switch (T.getDarwinMajorNumber()) {
case 7: // 10.3 Panther.
case 8: // 10.4 Tiger.
CommDirectiveSupportsAlignment = false;
break;
case 9: // 10.5 Leopard.
case 10: // 10.6 SnowLeopard.
break;
}
}
TargetLoweringObjectFile::Initialize(Ctx, TM);