diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2011-06-07 23:39:17 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2011-06-07 23:39:17 +0000 |
commit | db6393f259b8e634302e27d538ca4760f4221d91 (patch) | |
tree | 92777e09272a74e5e4e784c4493ba228f7d2d3d0 /lib/Driver/Tools.cpp | |
parent | 175df89a9794271669ec347c8c842a99271cbfce (diff) |
Sort -lgcc after -lgcc_s for NetBSD, otherwise shared libraries on i386
may pick it up. This would create bad text relocations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 03b7e2029f..bc3ff6873b 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -3751,7 +3751,6 @@ void netbsd::Link::ConstructJob(Compilation &C, const JobAction &JA, } // FIXME: For some reason GCC passes -lgcc and -lgcc_s before adding // the default system libraries. Just mimic this for now. - CmdArgs.push_back("-lgcc"); if (Args.hasArg(options::OPT_static)) { CmdArgs.push_back("-lgcc_eh"); } else { @@ -3759,6 +3758,7 @@ void netbsd::Link::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-lgcc_s"); CmdArgs.push_back("--no-as-needed"); } + CmdArgs.push_back("-lgcc"); if (Args.hasArg(options::OPT_pthread)) CmdArgs.push_back("-lpthread"); |