summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Support/ToolRunner.cpp4
-rw-r--r--tools/bugpoint/ToolRunner.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/Support/ToolRunner.cpp b/lib/Support/ToolRunner.cpp
index a25e4bd090..46971f8d23 100644
--- a/lib/Support/ToolRunner.cpp
+++ b/lib/Support/ToolRunner.cpp
@@ -450,6 +450,10 @@ int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType,
#else
"-shared", // `-shared' for Linux/X86, maybe others
#endif
+
+#if defined(__ia64__)
+ "-fPIC", // IA64 requires shared objs to contain PIC
+#endif
"-o", OutputFile.c_str(), // Output to the right filename...
"-O2", // Optimize the program a bit...
0
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index a25e4bd090..46971f8d23 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -450,6 +450,10 @@ int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType,
#else
"-shared", // `-shared' for Linux/X86, maybe others
#endif
+
+#if defined(__ia64__)
+ "-fPIC", // IA64 requires shared objs to contain PIC
+#endif
"-o", OutputFile.c_str(), // Output to the right filename...
"-O2", // Optimize the program a bit...
0