diff options
-rw-r--r-- | gnu/llvm/tools/clang/lib/Driver/ToolChains.cpp | 2 | ||||
-rw-r--r-- | gnu/llvm/tools/clang/lib/Driver/Tools.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/ToolChains.cpp b/gnu/llvm/tools/clang/lib/Driver/ToolChains.cpp index 45622b22ab5..7ba8f25efdd 100644 --- a/gnu/llvm/tools/clang/lib/Driver/ToolChains.cpp +++ b/gnu/llvm/tools/clang/lib/Driver/ToolChains.cpp @@ -2977,7 +2977,7 @@ OpenBSD::OpenBSD(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) : Generic_ELF(D, Triple, Args) { getFilePaths().push_back(getDriver().Dir + "/../lib"); - getFilePaths().push_back("/usr/lib"); + getFilePaths().push_back(getDriver().SysRoot + "/usr/lib"); } Tool *OpenBSD::buildAssembler() const { diff --git a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp index 656a8fbbdaf..34cbd620b4b 100644 --- a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp +++ b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp @@ -7623,8 +7623,10 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, } } - Args.AddAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group, - options::OPT_e, options::OPT_s, options::OPT_t, + Args.AddAllArgs(CmdArgs, options::OPT_L); + getToolChain().AddFilePathLibArgs(Args, CmdArgs); + Args.AddAllArgs(CmdArgs, {options::OPT_T_Group, options::OPT_e, + options::OPT_s, options::OPT_t, options::OPT_Z_Flag, options::OPT_r}); AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs); |