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 :slight_smile:

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 :slight_smile:

Cheers,
Rafael

llvm-gcc.patch (1.86 KB)

Bugs 1519 and 1521 currently prevent a clean bootstrap on Linux
x86_64. I was able to hack it to work :slight_smile:

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 :slight_smile:

I'm not opposed to this as a short-term hack. Do you think we should commit it until PR1521 is resolved?

-Chris

This patch is ok. I'm building llvm-gcc right now. I'll apply this chunk after build finishes.

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