tstellar / rpms / llvm

Forked from rpms/llvm 5 years ago
Clone
a894547
From bda67d3141acf120df8db57052603e9a18d86523 Mon Sep 17 00:00:00 2001
a894547
From: Tom Stellard <tstellar@redhat.com>
a894547
Date: Fri, 10 Aug 2018 14:54:17 -0700
a894547
Subject: [PATCH] [gold] Fix Tests cases on i686
a894547
a894547
---
a894547
 test/tools/gold/X86/common.ll       | 10 +++++-----
a894547
 test/tools/gold/X86/v1.16/wrap-1.ll |  4 ++--
a894547
 test/tools/gold/X86/v1.16/wrap-2.ll |  4 ++--
a894547
 3 files changed, 9 insertions(+), 9 deletions(-)
a894547
a894547
diff --git a/test/tools/gold/X86/common.ll b/test/tools/gold/X86/common.ll
a894547
index 1debe78..d8b4e03 100644
a894547
--- a/test/tools/gold/X86/common.ll
a894547
+++ b/test/tools/gold/X86/common.ll
a894547
@@ -8,7 +8,7 @@ target triple = "x86_64-unknown-linux-gnu"
a894547
 
a894547
 @a = common global i16 0, align 8
a894547
 
a894547
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
a894547
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
a894547
 ; RUN:    --plugin-opt=emit-llvm \
a894547
 ; RUN:    -shared %t1.o %t2.o -o %t3.o
a894547
 ; RUN: llvm-dis %t3.o -o - | FileCheck %s --check-prefix=A
a894547
@@ -16,7 +16,7 @@ target triple = "x86_64-unknown-linux-gnu"
a894547
 ; Shared library case, we merge @a as common and keep it for the symbol table.
a894547
 ; A: @a = common global [4 x i8] zeroinitializer, align 8
a894547
 
a894547
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
a894547
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
a894547
 ; RUN:    --plugin-opt=emit-llvm \
a894547
 ; RUN:    -shared %t1.o %t2b.o -o %t3.o
a894547
 ; RUN: llvm-dis %t3.o -o - | FileCheck %s --check-prefix=B
a894547
@@ -24,7 +24,7 @@ target triple = "x86_64-unknown-linux-gnu"
a894547
 ; (i16 align 8) + (i8 align 16) = i16 align 16
a894547
 ; B: @a = common global i16 0, align 16
a894547
 
a894547
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
a894547
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
a894547
 ; RUN:    --plugin-opt=emit-llvm \
a894547
 ; RUN:    -shared %t1.o %t2c.o -o %t3.o
a894547
 ; RUN: llvm-dis %t3.o -o - | FileCheck %s --check-prefix=C
a894547
@@ -32,7 +32,7 @@ target triple = "x86_64-unknown-linux-gnu"
a894547
 ; (i16 align 8) + (i8 align 1) = i16 align 8.
a894547
 ; C: @a = common global i16 0, align 8
a894547
 
a894547
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
a894547
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
a894547
 ; RUN:    --plugin-opt=emit-llvm \
a894547
 ; RUN:    %t1.o %t2.o -o %t3.o
a894547
 ; RUN: llvm-dis %t3.o -o - | FileCheck --check-prefix=EXEC %s
a894547
@@ -41,7 +41,7 @@ target triple = "x86_64-unknown-linux-gnu"
a894547
 ; EXEC: @a = internal global [4 x i8] zeroinitializer, align 8
a894547
 
a894547
 ; RUN: llc %p/Inputs/common.ll -o %t2native.o -filetype=obj
a894547
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
a894547
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
a894547
 ; RUN:    --plugin-opt=emit-llvm \
a894547
 ; RUN:    %t1.o %t2native.o -o %t3.o
a894547
 ; RUN: llvm-dis %t3.o -o - | FileCheck --check-prefix=MIXED %s
a894547
diff --git a/test/tools/gold/X86/v1.16/wrap-1.ll b/test/tools/gold/X86/v1.16/wrap-1.ll
a894547
index 5ea83b0..806442e 100644
a894547
--- a/test/tools/gold/X86/v1.16/wrap-1.ll
a894547
+++ b/test/tools/gold/X86/v1.16/wrap-1.ll
a894547
@@ -1,12 +1,12 @@
a894547
 ; LTO
a894547
 ; RUN: llvm-as %s -o %t.o
a894547
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps
a894547
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps
a894547
 ; RUN: llvm-readobj -t %t.out | FileCheck %s
a894547
 ; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s
a894547
 
a894547
 ; ThinLTO
a894547
 ; RUN: opt -module-summary %s -o %t.o
a894547
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps
a894547
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps
a894547
 ; RUN: llvm-readobj -t %t.out | FileCheck %s
a894547
 ; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s
a894547
 
a894547
diff --git a/test/tools/gold/X86/v1.16/wrap-2.ll b/test/tools/gold/X86/v1.16/wrap-2.ll
a894547
index 7c1d95d..f36456c 100644
a894547
--- a/test/tools/gold/X86/v1.16/wrap-2.ll
a894547
+++ b/test/tools/gold/X86/v1.16/wrap-2.ll
a894547
@@ -7,14 +7,14 @@
a894547
 ; LTO defsym handling, gold will need a fix (not the gold plugin).
a894547
 ; RUN-TODO: llvm-as %s -o %t.o
a894547
 ; RUN-TODO: llvm-as %S/Inputs/wrap-bar.ll -o %t1.o
a894547
-; RUN-TODO: %gold -plugin %llvmshlibdir/LLVMgold%shlibext %t.o %t1.o -shared -o %t.so -wrap=bar
a894547
+; RUN-TODO: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o %t1.o -shared -o %t.so -wrap=bar
a894547
 ; RUN-TODO: llvm-objdump -d %t.so | FileCheck %s
a894547
 ; RUN-TODO: llvm-readobj -t %t.so | FileCheck -check-prefix=BIND %s
a894547
 
a894547
 ; ThinLTO
a894547
 ; RUN: opt -module-summary %s -o %t.o
a894547
 ; RUN: opt -module-summary %S/Inputs/wrap-bar.ll -o %t1.o
a894547
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext %t.o %t1.o -shared -o %t.so -wrap=bar
a894547
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o %t1.o -shared -o %t.so -wrap=bar
a894547
 ; RUN: llvm-objdump -d %t.so | FileCheck %s -check-prefix=THIN
a894547
 ; RUN: llvm-readobj -t %t.so | FileCheck -check-prefix=BIND %s
a894547
 
a894547
-- 
a894547
1.8.3.1
a894547