Rafael EspĂndola
2007-Jun-21 20:37 UTC
[LLVMdev] hacked up llvm-gcc bootstraps on linux-x86_64
Bugs 1519 and 1521 currently prevent a clean bootstrap on Linux x86_64. I was able to hack it to work :-) The attached patch includes two parts. One is a tentative fix bug 1519: just set LastFieldStartsAtNonByteBoundry in allFieldsAreNotBitFields. The other one is a plain hack. llvm-gcc and gcc disagree on how to pass some structures, so stage2 gcc fails to use the libcpp compiled by gcc. So I just copied a function form libcpp to gcc itself :-) Cheers, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm-gcc.patch Type: text/x-patch Size: 1909 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070621/793fa739/attachment.bin>
Devang Patel
2007-Jun-21 21:56 UTC
[LLVMdev] hacked up llvm-gcc bootstraps on linux-x86_64
On Jun 21, 2007, at 3:01 PM, Chris Lattner wrote:> On Thu, 21 Jun 2007, [UTF-8] Rafael Esp?ndola wrote: >> Bugs 1519 and 1521 currently prevent a clean bootstrap on Linux >> x86_64. I was able to hack it to work :-) >> >> The attached patch includes two parts. One is a tentative fix bug >> 1519: just set LastFieldStartsAtNonByteBoundry in >> allFieldsAreNotBitFields. > > Cool, I'll let Duncan or Devang comment on this patch, it looks simple > enough, but they are the experts on the code.This patch is ok. I'm building llvm-gcc right now. I'll apply this chunk after build finishes. - Devang
Chris Lattner
2007-Jun-21 22:01 UTC
[LLVMdev] hacked up llvm-gcc bootstraps on linux-x86_64
On Thu, 21 Jun 2007, [UTF-8] Rafael Esp?ndola wrote:> Bugs 1519 and 1521 currently prevent a clean bootstrap on Linux > x86_64. I was able to hack it to work :-) > > The attached patch includes two parts. One is a tentative fix bug > 1519: just set LastFieldStartsAtNonByteBoundry in > allFieldsAreNotBitFields.Cool, I'll let Duncan or Devang comment on this patch, it looks simple enough, but they are the experts on the code.> The other one is a plain hack. llvm-gcc and gcc disagree on how to > pass some structures, so stage2 gcc fails to use the libcpp compiled > by gcc. So I just copied a function form libcpp to gcc itself :-)I'm not opposed to this as a short-term hack. Do you think we should commit it until PR1521 is resolved? -Chris -- http://nondot.org/sabre/ http://llvm.org/
Chris Lattner
2007-Jun-22 00:07 UTC
[LLVMdev] hacked up llvm-gcc bootstraps on linux-x86_64
On Thu, 21 Jun 2007, [UTF-8] Rafael Esp?ndola wrote:> The other one is a plain hack. llvm-gcc and gcc disagree on how to > pass some structures, so stage2 gcc fails to use the libcpp compiled > by gcc. So I just copied a function form libcpp to gcc itself :-)I went back and forth on this one, but eventually decided that that ability to bootstrap llvm-gcc on a major platform is more important than avoiding a (very cute and well crafted) little hack. I checked in the patch, we can revert it when the real fix for PR1521 is done. I also wrote a detailed description of the proposed fix for PR1521 in the bug if anyone is interested. The fix would dramatically improve codegen quality for structs passed by value (e.g. structs with vectors in them, complex numbers, etc), in addition to fixing the correctness problem. -Chris -- http://nondot.org/sabre/ http://llvm.org/