From: Chris Lattner Date: Sat, 4 Feb 2006 05:02:27 +0000 (+0000) Subject: Let bugpoint work on sparc with v9 instructions enabled. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fdcc71eaa804f3a2604485def9c3757488e8dcdb;p=oota-llvm.git Let bugpoint work on sparc with v9 instructions enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25958 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/ToolRunner.cpp b/lib/Support/ToolRunner.cpp index a9b68deecab..a967e3e8377 100644 --- a/lib/Support/ToolRunner.cpp +++ b/lib/Support/ToolRunner.cpp @@ -399,6 +399,9 @@ int GCC::ExecuteProgram(const std::string &ProgramFile, GCCArgs.push_back("-O2"); // Optimize the program a bit... #if defined (HAVE_LINK_R) GCCArgs.push_back("-Wl,-R."); // Search this dir for .so files +#endif +#ifdef __sparc__ + GCCArgs.push_back("-mcpu=v9"); #endif GCCArgs.push_back(0); // NULL terminator @@ -457,6 +460,9 @@ int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType, #if defined(__ia64__) || defined(__alpha__) "-fPIC", // IA64 requires shared objs to contain PIC +#endif +#ifdef __sparc__ + "-mcpu=v9", #endif "-o", OutputFile.c_str(), // Output to the right filename... "-O2", // Optimize the program a bit... diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp index a9b68deecab..a967e3e8377 100644 --- a/tools/bugpoint/ToolRunner.cpp +++ b/tools/bugpoint/ToolRunner.cpp @@ -399,6 +399,9 @@ int GCC::ExecuteProgram(const std::string &ProgramFile, GCCArgs.push_back("-O2"); // Optimize the program a bit... #if defined (HAVE_LINK_R) GCCArgs.push_back("-Wl,-R."); // Search this dir for .so files +#endif +#ifdef __sparc__ + GCCArgs.push_back("-mcpu=v9"); #endif GCCArgs.push_back(0); // NULL terminator @@ -457,6 +460,9 @@ int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType, #if defined(__ia64__) || defined(__alpha__) "-fPIC", // IA64 requires shared objs to contain PIC +#endif +#ifdef __sparc__ + "-mcpu=v9", #endif "-o", OutputFile.c_str(), // Output to the right filename... "-O2", // Optimize the program a bit...