[cfe-commits] r141573 - /cfe/trunk/lib/Driver/Tools.cpp
Roman Divacky
rdivacky at freebsd.org
Mon Oct 10 12:47:45 PDT 2011
Author: rdivacky
Date: Mon Oct 10 14:47:45 2011
New Revision: 141573
URL: http://llvm.org/viewvc/llvm-project?rev=141573&view=rev
Log:
Link in Scrt1.o instead of crt1.o when -pie is specified.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=141573&r1=141572&r2=141573&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Oct 10 14:47:45 2011
@@ -3929,9 +3929,11 @@
if (Args.hasArg(options::OPT_pg))
CmdArgs.push_back(Args.MakeArgString(
getToolChain().GetFilePath("gcrt1.o")));
- else
+ else {
+ const char *crt = Args.hasArg(options::OPT_pie) ? "Scrt1.o" : "crt1.o";
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath("crt1.o")));
+ getToolChain().GetFilePath(crt)));
+ }
CmdArgs.push_back(Args.MakeArgString(
getToolChain().GetFilePath("crti.o")));
CmdArgs.push_back(Args.MakeArgString(
More information about the cfe-commits
mailing list