https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82708

Keno Fischer <keno at juliacomputing dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #6 from Keno Fischer <keno at juliacomputing dot com> ---
I have unsuccessfully tried to make that option work. I am able to build glibc
with the bootstrap compiler, but the second stage build invariably fails. I ran
into a bunch of problems.

First, the build process looking for the headers in <path>/sys-include rather
than <path>/include where glibc installs them. Leads to the same symptoms as
reported in this issue.

Then, I tried using --with-sysroot which I wasn't using before, but then I got
confusion between <sysroot>/usr/include and <sysroot>/include (most parts of
the build system looking in usr/include, but others such as when building
libgcc seem to be looking in <sysroot>/include/). If I symlink those paths
together things progress farther but eventually fail to link. I also tried
replicating the glibc script you pointed to, without much luck (some mixture of
the above symptoms).

Given that I get a well functioning cross compiler, using the original recipe
with a simple patch to mpxrt-utils.c to bypass the broken limits.h file, I'm
tempted to move on and leave this be. I'll note at this point that e.g.
http://www.linuxfromscratch.org/lfs/view/development/chapter05/gcc-pass2.html
also suggests patching the limits.h file manually, so at least I'm not the only
one.
I guess I had hoped that there was something that could be done in the gcc
build system to make this experience less frustrating for the next person.

If not that, a modern guide on how to do this by somebody who knows how it's
supposed to be would be great, since all the guides out there seem to have some
step of "and this is where we hack around gcc/glibc's broken build systems". It
sounds like things have improved since those guides were written, which is
great, but I have no idea what the right commands are.

I am grateful you took the time to answer my questions here.

Reply via email to