aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-04 18:35:47 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-04 18:35:47 +0000
commitae33f8ff4749dd69060c70dae15e68e454dc3011 (patch)
tree52f5ba274badd0cf5ce674d4bf4fcca50966f8c8 /lib/Driver/Tools.cpp
parentd82f8fa53771b454885c546f0fd452a4980b3a3e (diff)
Merge libgcc spec changes for darwin::Link::ConstructJob.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index d9fea2e98d..a35d745cf1 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1700,7 +1700,9 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-lcrt0.o");
} else {
// Derived from darwin_crt1 spec.
- if (isMacosxVersionLT(MacosxVersion, 10, 5))
+ if (getDarwinToolChain().isIPhone()) {
+ CmdArgs.push_back("-lcrt1.o");
+ } else if (isMacosxVersionLT(MacosxVersion, 10, 5))
CmdArgs.push_back("-lcrt1.o");
else if (isMacosxVersionLT(MacosxVersion, 10, 6))
CmdArgs.push_back("-lcrt1.10.5.o");
@@ -1789,7 +1791,11 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-lgcc_eh");
} else if (Args.hasArg(options::OPT_miphoneos_version_min_EQ)) {
// Derived from darwin_iphoneos_libgcc spec.
- CmdArgs.push_back("-lgcc_s.10.5");
+ if (getDarwinToolChain().isIPhone()) {
+ CmdArgs.push_back("-lgcc_s.1");
+ } else {
+ CmdArgs.push_back("-lgcc_s.10.5");
+ }
} else if (Args.hasArg(options::OPT_shared_libgcc) ||
// FIXME: -fexceptions -fno-exceptions means no exceptions
Args.hasArg(options::OPT_fexceptions) ||
@@ -1808,7 +1814,8 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-lgcc_s.10.5");
}
- if (isMacosxVersionLT(MacosxVersion, 10, 6)) {
+ if (getDarwinToolChain().isIPhone() ||
+ isMacosxVersionLT(MacosxVersion, 10, 6)) {
CmdArgs.push_back("-lgcc");
CmdArgs.push_back("-lSystem");
} else {