summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/tools/gold/gold-plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 105fef9a2d7..cd4e39cb81c 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -984,6 +984,10 @@ void CodeGen::initTargetMachine() {
FeaturesString = Features.getString();
Options = InitTargetOptionsFromCodeGenFlags();
+ // Disable the new X86 relax relocations since gold might not support them.
+ // FIXME: Check the gold version or add a new option to enable them.
+ Options.RelaxELFRelocations = false;
+
TM = createTargetMachine();
}
OpenPOWER on IntegriCloud