From 812022164768db823c2716eb381dc1ba08aa344e Mon Sep 17 00:00:00 2001 From: Pascal Stumpf Date: Tue, 6 Sep 2016 14:51:07 +0000 Subject: Link to -lcompiler_rt instead of -lgcc. looks good to stefan@ --- gnu/llvm/tools/clang/lib/Driver/Tools.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'gnu/llvm') 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)) { -- cgit v1.2.3