From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 6316C3858401 for ; Mon, 8 Nov 2021 11:46:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6316C3858401 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id ABD2F342F12; Mon, 8 Nov 2021 11:46:11 +0000 (UTC) Date: Mon, 8 Nov 2021 06:46:12 -0500 From: Mike Frysinger To: newlib@sourceware.org Subject: Re: what's up with _COMPILING_NEWLIB Message-ID: Mail-Followup-To: newlib@sourceware.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DkrEUF1MRYZz8gaY" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2021 11:46:16 -0000 --DkrEUF1MRYZz8gaY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 s= ymbol > > that indicates the code currently being compiled is newlib itself so th= at the > > header can change behavior for that environment specifically. is that = what > > it's meant for ? > >=20 > > if so, why does it seem to be inconsistently defined ? newlib/configur= e.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/cygwi= n/ > > files. it feels like the patch below is what we should have. > >=20 > > 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. >=20 > _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. -mike --DkrEUF1MRYZz8gaY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmGJDgQACgkQQWM7n+g3 9YEUSg//ZBnd643Ddbpb+JLKaUyEPF18XltNwyZoCk5zhqlxXIw7reKFPypvGZmy Gy0ONJ57ZF8IqKxtKcgn4LgYMUm18WAdkxdC4Grd969AikXPvtqx3lu4uXr/EP90 S6U20Qx13CQ7VMCmTVghStnFSPn8tQOKjV/Mg87JTT07+yfQXGjgj4i5oQo1S7MC DbxcgyMctSq960HWEV+NRLeq+ZemzjVHLO8J2S02cibHf5B3FLPojfbW1mT03K/5 00WQYUclx9x+DJtiQGyl/JTeN6dsV+Yd+c9TTBOwk3Uu+AtPxWk0FuVfdkHsy1a2 VIyr+/wS7Rfydr6PDMlSZkBLU0XgywpZzKkBLAVFyXPahYZRZT2OEAL9TX6yWFQE EaQXu8te/AAxFCFIi256LlHOE8BCDHJVjDVx/RaGV72Y5zAuKpifRd55i1dPiVjK maoRjr0Nym+xNfrSGZYg0N04TZFyyW1lg0IYgqtc36DPfDSCq89e/zHFX5wkDDsF xnygbL6Cwz3SvhSHD/28teqbFZcrDW1VRrhPybkEWcYYKKt4ARSGsX8rAcBPUAt/ QRMMB51NWqBK/58eDjow2+sk/141X7ckfYA/HtdatB9PsGdq5MdmfDOVYB06UJ7o WseZc4WRX0n3XGJeB5SPV566mEVOj/1QhiW2qVmrTPYsmQpW3uY= =sn4j -----END PGP SIGNATURE----- --DkrEUF1MRYZz8gaY--