[gold] [PATCH] Add -m -m elf_x86_64 -plugin-opt=mtriple=x86_64-linux-gnu
H.J. Lu
hjl.tools at gmail.com
Sat Mar 21 08:37:56 PDT 2015
Gold with elf_x86_64 support may not default to elf_x86_64 and the llvm
default triple may not be x86_64-linux-gnu. This patch passes explicit
-m elf_x86_64 -plugin-opt=mtriple=x86_64-linux-gnu to gold. This fixes
https://llvm.org/bugs/show_bug.cgi?id=22966
--
H.J.
-------------- next part --------------
From b0e6c836d668dce92a08a133760379e47b84f9cd Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools at gmail.com>
Date: Fri, 20 Mar 2015 07:42:18 -0700
Subject: [PATCH] Add -m -m elf_x86_64 -plugin-opt=mtriple=x86_64-linux-gnu
Gold with elf_x86_64 support may not default to elf_x86_64 and the llvm
default triple may not be x86_64-linux-gnu. This patch passes explicit
-m elf_x86_64 -plugin-opt=mtriple=x86_64-linux-gnu to gold. This fixes
https://llvm.org/bugs/show_bug.cgi?id=22966
---
test/tools/gold/pr19901.ll | 4 +++-
test/tools/gold/remarks.ll | 6 ++++--
test/tools/gold/vectorize.ll | 3 ++-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/test/tools/gold/pr19901.ll b/test/tools/gold/pr19901.ll
index 2a7dea1..5b2ab5b 100644
--- a/test/tools/gold/pr19901.ll
+++ b/test/tools/gold/pr19901.ll
@@ -1,6 +1,8 @@
; RUN: llc %s -o %t.o -filetype=obj -relocation-model=pic
; RUN: llvm-as %p/Inputs/pr19901-1.ll -o %t2.o
-; RUN: %gold -shared -o %t.so -plugin %llvmshlibdir/LLVMgold.so %t2.o %t.o
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: -plugin-opt=mtriple=x86_64-linux-gnu \
+; RUN: -shared -m elf_x86_64 -o %t.so %t2.o %t.o
; RUN: llvm-readobj -t %t.so | FileCheck %s
; CHECK: Symbol {
diff --git a/test/tools/gold/remarks.ll b/test/tools/gold/remarks.ll
index f84016e..226d47f 100644
--- a/test/tools/gold/remarks.ll
+++ b/test/tools/gold/remarks.ll
@@ -1,9 +1,11 @@
; RUN: llvm-as %s -o %t.o
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: -plugin-opt=mtriple=x86_64-linux-gnu \
; RUN: -plugin-opt=-pass-remarks=inline %t.o -o %t2.o 2>&1 | FileCheck %s
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: -plugin-opt=mtriple=x86_64-linux-gnu \
; RUN: %t.o -o %t2.o 2>&1 | FileCheck -allow-empty --check-prefix=NO-REMARK %s
diff --git a/test/tools/gold/vectorize.ll b/test/tools/gold/vectorize.ll
index 121c96e..a5f1fc4 100644
--- a/test/tools/gold/vectorize.ll
+++ b/test/tools/gold/vectorize.ll
@@ -1,6 +1,7 @@
; RUN: llvm-as %s -o %t.o
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: --plugin-opt=mtriple=x86_64-linux-gnu \
; RUN: --plugin-opt=save-temps \
; RUN: -shared %t.o -o %t2.o
; RUN: llvm-dis %t2.o.opt.bc -o - | FileCheck %s
--
1.9.3
More information about the llvm-commits
mailing list