Message ID | 687108d5-4350-4833-8bd4-2e3ff458c498@embedded-brains.de |
---|---|
State | New |
Headers |
Return-Path: <newlib-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1E0063857C44 for <patchwork@sourceware.org>; Mon, 11 Sep 2023 07:12:46 +0000 (GMT) X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id BD49F3858D37 for <newlib@sourceware.org>; Mon, 11 Sep 2023 07:12:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD49F3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de Received: from sslproxy05.your-server.de ([78.46.172.2]) by dedi548.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <sebastian.huber@embedded-brains.de>) id 1qfb61-0008ou-I0 for newlib@sourceware.org; Mon, 11 Sep 2023 09:12:33 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <sebastian.huber@embedded-brains.de>) id 1qfb61-000PdL-EP for newlib@sourceware.org; Mon, 11 Sep 2023 09:12:33 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 1C7BD480078 for <newlib@sourceware.org>; Mon, 11 Sep 2023 09:12:33 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavis, port 10032) with ESMTP id vxaOLHDHbc5t for <newlib@sourceware.org>; Mon, 11 Sep 2023 09:12:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id CA19948015D for <newlib@sourceware.org>; Mon, 11 Sep 2023 09:12:32 +0200 (CEST) X-Virus-Scanned: amavis at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavis, port 10026) with ESMTP id foMtliB6G9dU for <newlib@sourceware.org>; Mon, 11 Sep 2023 09:12:32 +0200 (CEST) Received: from [10.10.171.34] (unknown [10.10.171.34]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 985FE480078 for <newlib@sourceware.org>; Mon, 11 Sep 2023 09:12:32 +0200 (CEST) Message-ID: <687108d5-4350-4833-8bd4-2e3ff458c498@embedded-brains.de> Date: Mon, 11 Sep 2023 09:12:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: newlib <newlib@sourceware.org> From: Sebastian Huber <sebastian.huber@embedded-brains.de> Subject: Regenerate newlib/newlib.hin? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldi-networks.de X-Virus-Scanned: Clear (ClamAV 0.103.8/27027/Sun Sep 10 09:37:07 2023) X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list <newlib.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/newlib>, <mailto:newlib-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/newlib/> List-Post: <mailto:newlib@sourceware.org> List-Help: <mailto:newlib-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/newlib>, <mailto:newlib-request@sourceware.org?subject=subscribe> Errors-To: newlib-bounces+patchwork=sourceware.org@sourceware.org Sender: "Newlib" <newlib-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Regenerate newlib/newlib.hin?
|
|
Commit Message
Sebastian Huber
Sept. 11, 2023, 7:12 a.m. UTC
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?
Comments
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.
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
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__ */