summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2008-04-06 12:42:29 +0000
committerTorok Edwin <edwintorok@gmail.com>2008-04-06 12:42:29 +0000
commit538160b7ffb25a1fd2a88578b2fe35e275222d41 (patch)
treee5815aa21a0028ecfd46c485390cc02e71b3912c
parent784903e4c1cc560943db5960faf2904b80ae4460 (diff)
downloadbcm5719-llvm-538160b7ffb25a1fd2a88578b2fe35e275222d41.tar.gz
bcm5719-llvm-538160b7ffb25a1fd2a88578b2fe35e275222d41.zip
-fPIC is required on x86-64 when building shared objects.
llvm-svn: 49274
-rw-r--r--llvm/tools/bugpoint/Miscompilation.cpp2
-rw-r--r--llvm/tools/bugpoint/ToolRunner.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/bugpoint/Miscompilation.cpp b/llvm/tools/bugpoint/Miscompilation.cpp
index 9f4d2efc915..f2b1c724b6e 100644
--- a/llvm/tools/bugpoint/Miscompilation.cpp
+++ b/llvm/tools/bugpoint/Miscompilation.cpp
@@ -907,7 +907,7 @@ bool BugDriver::debugCodeGenerator() {
#if defined(sparc) || defined(__sparc__) || defined(__sparcv9)
<< " -G" // Compile a shared library, `-G' for Sparc
#else
- << " -shared" // `-shared' for Linux/X86, maybe others
+ << " -fPIC -shared" // `-shared' for Linux/X86, maybe others
#endif
<< " -fno-strict-aliasing\n";
diff --git a/llvm/tools/bugpoint/ToolRunner.cpp b/llvm/tools/bugpoint/ToolRunner.cpp
index aa3caff0267..d1e058e3ceb 100644
--- a/llvm/tools/bugpoint/ToolRunner.cpp
+++ b/llvm/tools/bugpoint/ToolRunner.cpp
@@ -572,7 +572,7 @@ int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType,
GCCArgs.push_back("-shared"); // `-shared' for Linux/X86, maybe others
#endif
-#if defined(__ia64__) || defined(__alpha__)
+#if defined(__ia64__) || defined(__alpha__) || defined(__amd64__)
GCCArgs.push_back("-fPIC"); // Requires shared objs to contain PIC
#endif
#ifdef __sparc__
OpenPOWER on IntegriCloud