[llvm-commits] Patches to build EFI with clang/llvm

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Jan 25 17:40:09 PST 2011

On Jan 25, 2011, at 5:23 PM, Carl Norum wrote:
>>>> Takumi recently submitted a patch to do the exact same thing. I think he managed to avoid the new instructions. I think his solution was better, assuming it works for you.
>>> It very well might; I sort of inherited this code, so I'll have to dig around a bit before figuring that all out.  Has that patch gone into TOT, and if not, where can I get it from?
>> I think this was his latest attempt: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110110/115159.html
>> The changes haven't been committed, AFAIK.
> This patch worked great here - I haven't done exhaustive testing, but I could build EFI and boot/sleep/wake a couple of machines with the resulting binaries.  Is it expected that these patches will get committed sometime in the near future?


> Let me know what you think about the attached Mach-O patches! 

Somebody else should look at those.

Some of the conditionals look suspicious:

> +  if (Subtarget->isTargetDarwin() || Subtarget->isTargetMacho()) {
>      if (is64Bit)
>        return new X8664_MachoTargetObjectFile();
>      return new TargetLoweringObjectFileMachO();

Should that be just Subtarget->isTargetMacho()?

> -  if (TM.getSubtarget<X86Subtarget>().isTargetCOFF())
> +  if (Subtarget->isTargetCOFF() && !Subtarget->isTargetMacho())

Can COFF and Macho be true at the same time?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110125/3a0fd116/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110125/3a0fd116/attachment.bin>

More information about the llvm-commits mailing list