Re: the mystery of math.h in lib/gcc/%triple-name%/%gcc-version%/include-fixed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 24 Oct 2018 at 13:50, Marc Glisse wrote:
>
> On Wed, 24 Oct 2018, Jonathan Wakely wrote:
>
> > On Wed, 24 Oct 2018 at 04:25, Dennis Clarke <dclarke@xxxxxxxxxxxxx> wrote:
> >> The question has to be where do these "include-fixed" headers come
> >> from?
> >
> > The include-fixed headers are generated as part of the GCC build
> > process. The contents of the fixincludes dir in the GCC sources apply
> > a set of rules to fix known problems in the system headers (either
> > conformance bugs, or incompatibilities with GCC). That means the
> > include-fixed files are specific to the machine they were created for
> > (and any machines with the same set of headers).
> >
> >> I am looking for an end point result that I know I can drop
> >> on any similar machine and it will "just work"(tm).
> >
> > Generally "any similar machine" won't work, it needs to be exactly the
> > same, because otherwise differences in the libc headers cause this
> > kind of problem.
>
> I have old memories of people copying the compiler then rerunning just
> fixincludes on the new machine. I see that we install fixincl and
> fixinc.sh, possibly so we can rerun it when we update the system headers,
> but it could also be used for the other machine.

Ah yes, that sounds familiar to me too.

If the machines are hugely different things still won't work. For
example libstdc++ makes some decisions at build time and relies on
those still being available on the host machine later. Specifically,
if ::float_t is defined during the build libstdc++ will use it
unconditionally, so if it isn't present on the host machine later
(either in the host <math.h> or the include-fixed <math.h>) you'll
still get errors.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux