what's up with _COMPILING_NEWLIB
Corinna Vinschen
vinschen@redhat.com
Mon Nov 8 10:05:30 GMT 2021
On Nov 6 20:21, Mike Frysinger wrote:
> i stumbled across _COMPILING_NEWLIB and it seems to be what i want: a symbol
> that indicates the code currently being compiled is newlib itself so that the
> header can change behavior for that environment specifically. is that what
> it's meant for ?
>
> if so, why does it seem to be inconsistently defined ? newlib/configure.host
> will add it for a few random targets, as does the mips-specific
> newlib/libc/machine/mips/Makefile.am, as do a few specific winsup/cygwin/
> files. it feels like the patch below is what we should have.
>
> if that's not what this is for, is there a define that has this meaning ?
> in the glibc & gnulib world, the plain _LIBC define indicates this.
_COMPILING_NEWLIB might be older than that. In Cygwin we certainly need
it during build. Your patch looks good to me, did you test it for some
targets?
Thanks,
Corinna
More information about the Newlib
mailing list