public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Regenerate newlib/newlib.hin?
@ 2023-09-11  7:12 Sebastian Huber
  2023-09-12 18:54 ` Hans-Bernhard Bröker
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Huber @ 2023-09-11  7:12 UTC (permalink / raw)
  To: newlib

Hello,

when I run "autoreconf" in "newlib", I get the following local changes:

diff --git a/newlib/newlib.hin b/newlib/newlib.hin
index e87a5eabbb..7a1d921d6e 100644
--- a/newlib/newlib.hin
+++ b/newlib/newlib.hin
@@ -375,6 +375,9 @@
  /* nano version of malloc is used. */
  #undef _NANO_MALLOC

+/* "The newlib version in string format." */
+#undef _NEWLIB_VERSION
+
  /* Verify _REENT_CHECK macros allocate memory successfully. */
  #undef _REENT_CHECK_VERIFY

@@ -422,4 +425,13 @@
  /* Define if wide char orientation is supported. */
  #undef _WIDE_ORIENT

+/* "The newlib minor version number." */
+#undef __NEWLIB_MINOR__
+
+/* "The newlib patch level." */
+#undef __NEWLIB_PATCHLEVEL__
+
+/* "The newlib major version number." */
+#undef __NEWLIB__
+
  #endif /* !__NEWLIB_H__ */

Are these changes due to a local configuration or tooling issue or 
should we check in these changes?

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Regenerate newlib/newlib.hin?
  2023-09-11  7:12 Regenerate newlib/newlib.hin? Sebastian Huber
@ 2023-09-12 18:54 ` Hans-Bernhard Bröker
  2023-10-15  9:21   ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Hans-Bernhard Bröker @ 2023-09-12 18:54 UTC (permalink / raw)
  To: Sebastian Huber, newlib

Am 11.09.2023 um 09:12 schrieb Sebastian Huber:
> Hello,
> 
> when I run "autoreconf" in "newlib", I get the following local changes:
[...]
> Are these changes due to a local configuration or tooling issue or 
> should we check in these changes?

You almost certainly should not check in those changes.  In fact, you 
probably have to revert to the checked-in copy, or remove those changes 
manually.

They result from the very unusual way newlib handles configuration 
headers.  You'll find that those 4 elements are instead defined in the 
_other_ checked-in *.hin file: _newlib_version.hin.  We artificially 
split the autoheader definitions into these two separate files, and then 
#include the configure-generated _newlib_version.h into the generated 
newlib.h.

Unfortunately autoreconf does not really understand this rather 
convoluted scheme. While it allows for more than one call to 
AC_CONFIG_HEADER, to configure more than one *.hin file, it does not 
recognize the idea that autoheader should put any less than all of the 
AC_DEFINE()d entries into its output file (newlib.hin).

So this needs some extra, manual post-processing after running 
autoreconf, to remove the duplicate definitions.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Regenerate newlib/newlib.hin?
  2023-09-12 18:54 ` Hans-Bernhard Bröker
@ 2023-10-15  9:21   ` Mike Frysinger
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2023-10-15  9:21 UTC (permalink / raw)
  To: Hans-Bernhard Bröker; +Cc: Sebastian Huber, newlib

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

On 12 Sep 2023 20:54, Hans-Bernhard Bröker wrote:
> Am 11.09.2023 um 09:12 schrieb Sebastian Huber:
> > Hello,
> > 
> > when I run "autoreconf" in "newlib", I get the following local changes:
> [...]
> > Are these changes due to a local configuration or tooling issue or 
> > should we check in these changes?
> 
> You almost certainly should not check in those changes.  In fact, you 
> probably have to revert to the checked-in copy, or remove those changes 
> manually.
> 
> They result from the very unusual way newlib handles configuration 
> headers.  You'll find that those 4 elements are instead defined in the 
> _other_ checked-in *.hin file: _newlib_version.hin.  We artificially 
> split the autoheader definitions into these two separate files, and then 
> #include the configure-generated _newlib_version.h into the generated 
> newlib.h.
> 
> Unfortunately autoreconf does not really understand this rather 
> convoluted scheme. While it allows for more than one call to 
> AC_CONFIG_HEADER, to configure more than one *.hin file, it does not 
> recognize the idea that autoheader should put any less than all of the 
> AC_DEFINE()d entries into its output file (newlib.hin).
> 
> So this needs some extra, manual post-processing after running 
> autoreconf, to remove the duplicate definitions.

we already process newlib.h when generating it in configure to filter out
some content.  we could easily add these specific defines to the filter
to avoid confusion/mistakes during autoreconf.  i'll send a patch.
-mike

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-15  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11  7:12 Regenerate newlib/newlib.hin? Sebastian Huber
2023-09-12 18:54 ` Hans-Bernhard Bröker
2023-10-15  9:21   ` Mike Frysinger

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).