newlib: Clarify regeneration of config files

Message ID
State New
Series newlib: Clarify regeneration of config files |

Commit Message

Sebastian Huber Sept. 13, 2023, 9 a.m. UTC
 newlib/README | 14 ++++++++++++++
 1 file changed, 14 insertions(+)


Mike Frysinger Oct. 15, 2023, 9:33 a.m. UTC | #1
i posted a patch to automate this, so hopefully we don't need this
documentation update.


diff --git a/newlib/README b/newlib/README
index 1b2c16cd4..234666e19 100644
--- a/newlib/README
+++ b/newlib/README
@@ -525,6 +525,20 @@  steps, add the -v option.
 It is strongly advised that you use an adequate version of autotools.  For this
 latest release, the following were used: autoconf 2.69 and automake 1.15.1.
+Running autoreconf in the newlib directory may produce changes in newlib.hin.
+Usually, these changes need to be reverted manually and should not be checked
+in.  The changes result from the very unusual way newlib handles configuration
+headers.  You will find that the new elements in newlib.hin are instead defined
+in the other checked-in file _newlib_version.hin.  Newlib splits the autoheader
+definitions into these two separate files, and then includes 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 entries defined by AC_DEFINE()
+into its output file (newlib.hin).  So, this needs some extra, manual
+post-processing after running autoreconf, to remove the duplicate definitions.
 Reporting Bugs