diff options
author | Pascal Stumpf <pascal@cvs.openbsd.org> | 2016-09-06 14:51:07 +0000 |
---|---|---|
committer | Pascal Stumpf <pascal@cvs.openbsd.org> | 2016-09-06 14:51:07 +0000 |
commit | 812022164768db823c2716eb381dc1ba08aa344e (patch) | |
tree | 7692c3a1f9d4e805e4764407d999c52ec749c394 /gnu/llvm | |
parent | 81116512c1f82af4fed9021a22ab1595f9524f9d (diff) |
Link to -lcompiler_rt instead of -lgcc.
looks good to stefan@
Diffstat (limited to 'gnu/llvm')
-rw-r--r-- | gnu/llvm/tools/clang/lib/Driver/Tools.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp index b19cd1065de..284de004973 100644 --- a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp +++ b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp @@ -7616,12 +7616,6 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, } } - std::string Triple = getToolChain().getTripleString(); - if (Triple.substr(0, 6) == "x86_64") - Triple.replace(0, 6, "amd64"); - CmdArgs.push_back( - Args.MakeArgString("-L/usr/lib/gcc-lib/" + Triple + "/4.2.1")); - Args.AddAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group, options::OPT_e, options::OPT_s, options::OPT_t, options::OPT_Z_Flag, options::OPT_r}); @@ -7639,7 +7633,7 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, // FIXME: For some reason GCC passes -lgcc before adding // the default system libraries. Just mimic this for now. - CmdArgs.push_back("-lgcc"); + CmdArgs.push_back("-lcompiler_rt"); if (Args.hasArg(options::OPT_pthread)) { if (!Args.hasArg(options::OPT_shared) && Args.hasArg(options::OPT_pg)) @@ -7655,7 +7649,7 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-lc"); } - CmdArgs.push_back("-lgcc"); + CmdArgs.push_back("-lcompiler_rt"); } if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) { |