public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: Re: what's up with _COMPILING_NEWLIB
Date: Mon, 8 Nov 2021 13:14:16 -0500	[thread overview]
Message-ID: <YYlo+M/tdnBs047a@vapier> (raw)
In-Reply-To: <YYk8rjLcx6N0K8K1@calimero.vinschen.de>

[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]

On 08 Nov 2021 16:05, Corinna Vinschen wrote:
> On Nov  8 06:46, Mike Frysinger wrote:
> > On 08 Nov 2021 11:05, Corinna Vinschen wrote:
> > > 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?
> > 
> > yes, i tested it for bfin-elf and with a change that needed it in ctype.h.
> > the ctype.h change didn't work until i updated the build this way.
> 
> uhm... why does a change in a header file depend on the build system?
> That sounds weird.

i'm making a fix to ctype.h that would utilize _COMPILING_NEWLIB as part of
its fix.  i was holding off posting that until the question of this symbol
could be sorted out.

> I tested building on Cygwin, which looks good.
> 
> So, here's a question: The patch is ok, just a change to the commit
> message would be nice.  However, would you like to take the opportunity
> to change _COMPILING_NEWLIB to _LIBC throughout?  That's something we
> should have done long ago, I guess.

let me do it as a series.  _LIBC is already used in newlib, so i'm afraid
it might not be as clean as just renaming the define.  but i'll give it a
shot and see what blows up.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-11-08 18:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07  0:21 Mike Frysinger
2021-11-08 10:05 ` Corinna Vinschen
2021-11-08 11:46   ` Mike Frysinger
2021-11-08 15:05     ` Corinna Vinschen
2021-11-08 18:14       ` Mike Frysinger [this message]
2021-11-09  1:24 ` [PATCH 1/2] define _COMPILING_NEWLIB for all targets when compiling Mike Frysinger
2021-11-09  1:24   ` [PATCH 2/2] ctype: use less short names in public header Mike Frysinger
2021-11-09 11:38     ` Corinna Vinschen
2021-11-10  0:18       ` Mike Frysinger
2021-11-10 10:56         ` Corinna Vinschen
2021-11-30 12:18         ` Jonathan Wakely
2021-11-11  1:37     ` [PATCH v2] " Mike Frysinger
2021-11-11 10:35       ` Corinna Vinschen
2021-11-11 22:28         ` Mike Frysinger
2021-11-12 10:27           ` Corinna Vinschen
2021-11-20 20:08             ` Brian Inglis
2021-11-23 15:09     ` [PATCH 2/2] " Richard Earnshaw
2021-11-24  4:15       ` Mike Frysinger
2021-11-24 10:58         ` Richard Earnshaw
2021-11-24 11:01           ` Richard Earnshaw
2021-11-30 12:01         ` Jonathan Wakely
2021-11-30 15:14           ` Corinna Vinschen
2021-11-30 17:12             ` Jonathan Wakely
2021-11-30 17:15               ` Jonathan Wakely
2021-11-30 17:52                 ` Richard Earnshaw
2021-12-02 10:27                   ` Corinna Vinschen
2021-12-03  9:56                     ` Corinna Vinschen
2021-12-05  9:42                   ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YYlo+M/tdnBs047a@vapier \
    --to=vapier@gentoo.org \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).