Re: PR target/47779 - detecting when compiling libgcc

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

 



"Henderson, Stuart" <Stuart.Henderson@xxxxxxxxxx> writes:

> In order to fix PR target/47779, an enum in a uClibc header (sys/ucontext.h) must be excluded during the compilation of libgcc to avoid a name clash between it and the various register macros in insn-constants.h.
>
> Is there an established/good practice way to do this?
>
> The only macro I can see that is defined specifically during the compilation of libgcc is IN_LIBGCC2, however this is in the user's namespace so can't be used in the header.  Is this by design to prevent the use of the macro in headers?

As I tried to say last time around, the fix is for gcc to not define
those macros when it includes sys/ucontext.h.  As Joseph says in the PR,
the clean way to do this is to avoid including tm.h.  The ugly but much
simpler way is to avoid defining those macros in tm.h, either by never
defining them or by only defining them when IN_LIBGCC2 is not defined.

That is, don't try to fix sys/ucontext.h.  Fix gcc.

Ian


[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