summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-05-08 22:36:08 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-05-10 15:59:17 +0200
commitdcd5f2bd0e7731601e1661346e705c59ea0bbe8d (patch)
tree469d0f3a2c2ebf9ab2ec530170d9045f6419922a
parent591b69b69fde339839f4a5b79418a5ac17ee50f4 (diff)
downloadclang-dcd5f2bd0e7731601e1661346e705c59ea0bbe8d.tar.gz
clang-dcd5f2bd0e7731601e1661346e705c59ea0bbe8d.tar.bz2
clang-dcd5f2bd0e7731601e1661346e705c59ea0bbe8d.tar.xz
[Embtk] gnutools::Assemble: MIPS: explicitly add -call_nonpic when compiling non PIC code
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org> (cherry picked from commit eb59af8b10ff9621d75e9a57a531783ce898c313)
-rw-r--r--lib/Driver/Tools.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 5f0487f178..229f68f194 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -5869,6 +5869,8 @@ void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
LastPICArg->getOption().matches(options::OPT_fPIE) ||
LastPICArg->getOption().matches(options::OPT_fpie))) {
CmdArgs.push_back("-KPIC");
+ } else {
+ CmdArgs.push_back("-call_nonpic");
}
} else if (getToolChain().getArch() == llvm::Triple::systemz) {
// At the moment we always produce z10 code.