| Summary: | sys-devel/llvm-9999 - clang-3.5-gentoo-install.patch fails | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | darkbasic <darkbasic> |
| Component: | [OLD] Development | Assignee: | Bernard Cafarelli <voyageur> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | bug, mgorny, michael |
| Priority: | Normal | Keywords: | PATCH |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
New patch
previous clang-3.5 patch sans header and addProfileRT section |
||
|
Description
darkbasic
2014-02-19 11:27:14 UTC
Created attachment 370752 [details]
New patch
+ 20 Feb 2014; Michał Górny <mgorny@gentoo.org> + files/clang-3.5-gentoo-install.patch: + Update clang patch wrt bug #501764. Committed, not tested since I'm no longer using the live ebuilds. Hope you attached a good patch :). Thanks. I'm sorry but I have to reopen: since last commit my patch is not enough anymore. https://github.com/llvm-mirror/clang/commit/43ad7ade304afe59f8f696de9aa7327c7acb0d3c Someone needs to have a look at clang-3.5-gentoo-install.patch Created attachment 370922 [details, diff]
previous clang-3.5 patch sans header and addProfileRT section
clang-3.5-gentoo-install.patch broke due to upstream changes in tools/clang/lib/Driver/Tools.cpp
Section of the original patch file having trouble:
@@ -222,7 +222,7 @@ static void addProfileRT(const ToolChain &TC, const ArgList &Args,
// libprofile_rt.so. We used to use the -l:libprofile_rt.a syntax, but that is
// not supported by old linkers.
std::string ProfileRT =
- std::string(TC.getDriver().Dir) + "/../lib/libprofile_rt.a";
+ "-l:libprofile_rt.a";
CmdArgs.push_back(Args.MakeArgString(ProfileRT));
}
New upstream code appears to have solved the issue requiring a patch:
static void addProfileRT(
const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) {
if (!(Args.hasArg(options::OPT_fprofile_arcs) ||
Args.hasArg(options::OPT_fprofile_generate) ||
Args.hasArg(options::OPT_fprofile_instr_generate) ||
Args.hasArg(options::OPT_fcreate_profile) ||
Args.hasArg(options::OPT_coverage)))
return;
// The profile runtime is located in the OS-specific resource directory and
// has name "libclang_rt.profile-<ArchName>.a".
SmallString<128> LibProfile(TC.getDriver().ResourceDir);
llvm::sys::path::append(
LibProfile, "lib", getOSNameForCompilerRTLib(TC),
Twine("libclang_rt.profile-") + getArchNameForCompilerRTLib(TC) + ".a");
CmdArgs.push_back(Args.MakeArgString(LibProfile));
}
I removed the addProfileRT section of the patch, both LLVM and clang built fine against LLVM git version f116e5308d2eed4b531da795e8eed91211c01241.
I also deleted the patch header since it looked out of date. Feel fee to re-add it if need be.
+ 21 Feb 2014; Michał Górny <mgorny@gentoo.org> + files/clang-3.5-gentoo-install.patch: + Update clang patch wrt bug #501764, again. |