This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: selective linking of floating point support for *printf / *scanf
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Thomas Preud'homme <thomas dot preudhomme at arm dot com>
- Cc: 'Joern Rennecke' <joern dot rennecke at embecosm dot com>, GCC <gcc at gcc dot gnu dot org>, Joerg Wunsch <joerg_wunsch at uriah dot heep dot sax dot de>, <avr-libc-dev at nongnu dot org>, Andrew Burgess <andrew dot burgess at embecosm dot com>, <newlib at sourceware dot org>
- Date: Thu, 23 Oct 2014 15:21:18 +0000
- Subject: RE: selective linking of floating point support for *printf / *scanf
- Authentication-results: sourceware.org; auth=none
- References: <CAMqJFCpWKXVmmc-YLKf9XO6H8C_YnTEcgzkJAidE21MirJbi-w at mail dot gmail dot com> <001401cfc0f9$bdc5cbc0$39516340$ at arm dot com> <CAMqJFCrEOgavwvW25vO=S-+0TZ_xOnDa0Ex-Ff4XG329K5WE9g at mail dot gmail dot com> <001901cfc1c4$d0678630$71369290$ at arm dot com> <CAMqJFCoFC8sVRQB3+v4dzSVc5LLs9cycjm621FmM34gGHRWFng at mail dot gmail dot com> <000001cfc1e3$7f1a22f0$7d4e68d0$ at arm dot com> <CAMqJFCo1EA8TLVsv=r7gW-udiH6pqBKVuQUvHeGcFDqrnMo_EQ at mail dot gmail dot com> <000101cfc281$3a3008f0$ae901ad0$ at arm dot com> <CAMqJFCrrj1_VHmz7G-VgDpLNGjsTtdjPLqbCRY1oVxeO-BESHw at mail dot gmail dot com> <000201cfc34f$1ceadb20$56c09160$ at arm dot com> <000801cfee9e$47919380$d6b4ba80$ at arm dot com>
On Thu, 23 Oct 2014, Thomas Preud'homme wrote:
> Hi all,
>
> I changed the target hook somehow so that more code run in the backend
> since depending on the target (avr-libc Vs newlib) two different schemes
> are used: printf -> iprintf renaming or defining _printf_float as a
> global symbol. I thus renamed the target hook to match such a usage.
>
> The proposed patch is attached to this email (otherwise it would be
> mangled).
I'm not clear if you're proposing such a patch for review, but note:
(a) you mean DEF_EXT_LIB_BUILTIN (since asprintf and vasprintf aren't in
ISO C);
(b) please don't add new target macros such as
CUSTOM_STDI_WEAK_SYM_PATTERN and CUSTOM_STDO_WEAK_SYM_PATTERN (if
something is defined in tm_defines and used in architecture-independent
code, it's effectively a target macro), find a way to implement these as
hooks instead.
--
Joseph S. Myers
joseph@codesourcery.com