[cfe-commits] [Patch] Add suppor for Bitrig, an OpenBSD fork.
Eli Friedman
eli.friedman at gmail.com
Wed Aug 8 16:59:16 PDT 2012
On Tue, Aug 7, 2012 at 8:59 PM, David Hill <dhill at mindcry.org> wrote:
> Ping.
r161546.
-Eli
> On Tue, Aug 07, 2012 at 12:03:28AM -0400, David Hill wrote:
>>On Mon, Aug 06, 2012 at 08:18:57PM -0700, Eli Friedman wrote:
>>>On Mon, Aug 6, 2012 at 7:28 PM, David Hill <dhill at mindcry.org> wrote:
>>>> Attached is a diff to add support for Bitrig, an OpenBSD fork.
>>>>
>>>> Please review.
>>>
>>>I'm a little uncomfortable with the amount of code which appears to be
>>>copy-pasted in lib/Driver/, but I'm not sure how much of it can be
>>>refactored. Worth considering, at least.
>>>
>>>+void Bitrig::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
>>>+ ArgStringList &CC1Args) const {
>>>+ if (DriverArgs.hasArg(options::OPT_nostdlibinc) ||
>>>+ DriverArgs.hasArg(options::OPT_nostdincxx))
>>>+ return;
>>>+
>>>+ std::string Triple = getTriple().str();
>>>+ if (Triple.substr(0, 5) == "amd64")
>>>+ Triple.replace(0, 5, "x86_64");
>>>+
>>>+ addSystemInclude(DriverArgs, CC1Args, "/usr/include/c++/4.6.2");
>>>+ addSystemInclude(DriverArgs, CC1Args, "/usr/include/c++/4.6.2/backward");
>>>+ addSystemInclude(DriverArgs, CC1Args, "/usr/include/c++/4.6.2/" + Triple);
>>>+
>>>+}
>>>
>>>Are you sure you want to hardcode this path?
>>
>>Yes, for now. We are working on getting libcxx in.
>>
>>>
>>>Also, I think you want support for libc++; not sure what the path
>>>would be, though.
>>>
>>>+ } else if (getToolChain().getOS().startswith("bitrig")) {
>>>+ if (getToolChain().getArch() == llvm::Triple::x86_64)
>>>+ CPUName = "x86-64";
>>>+ else if (getToolChain().getArch() == llvm::Triple::x86)
>>>+ CPUName = "i486";
>>
>>Done.
>>
>>>
>>>This is actually a non-trivial decision... LLVM code generation will
>>>be much happier if you bump it up to at least i686.
>>>
>>>Otherwise, looks fine.
>>>
>>>-Eli
>>
>>Attached is a new diff with the i686 change and sparcv9 code removed.
>>
>>Thanks,
>>David
More information about the cfe-commits
mailing list