From 64a11fded15b92b56b91d65fd5b2851245f69299 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 22 Aug 2022 17:54:43 -0400 Subject: [PATCH] Fix problem with _newlib_version.h not being filled in correctly --- newlib/_newlib_version.hin | 15 ++++----------- newlib/configure | 13 +++++++++++++ newlib/configure.ac | 5 +++++ 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/newlib/_newlib_version.hin b/newlib/_newlib_version.hin index 077b81ecf..26c680c8f 100644 --- a/newlib/_newlib_version.hin +++ b/newlib/_newlib_version.hin @@ -2,16 +2,9 @@ #ifndef _NEWLIB_VERSION_H__ #define _NEWLIB_VERSION_H__ 1 -/* The newlib version in string format. */ -#define _NEWLIB_VERSION "@NEWLIB_VERSION@" - -/* The newlib major version number. */ -#define __NEWLIB__ @NEWLIB_MAJOR_VERSION@ - -/* The newlib minor version number. */ -#define __NEWLIB_MINOR__ @NEWLIB_MINOR_VERSION@ - -/* The newlib patch level. */ -#define __NEWLIB_PATCHLEVEL__ @NEWLIB_PATCHLEVEL_VERSION@ +#undef _NEWLIB_VERSION +#undef __NEWLIB__ +#undef __NEWLIB_MINOR__ +#undef __NEWLIB_PATCHLEVEL__ #endif /* !_NEWLIB_VERSION_H__ */ diff --git a/newlib/configure b/newlib/configure index e493eb293..0b6ec15e9 100755 --- a/newlib/configure +++ b/newlib/configure @@ -6396,6 +6396,19 @@ $as_echo "$newlib_cv_build_exeext" >&6; } fi + +$as_echo "#define _NEWLIB_VERSION \"4.2.0\"" >>confdefs.h + + +$as_echo "#define __NEWLIB__ 4" >>confdefs.h + + +$as_echo "#define __NEWLIB_MINOR__ 2" >>confdefs.h + + +$as_echo "#define __NEWLIB_PATCHLEVEL__ 0" >>confdefs.h + + if test "${newlib_elix_level}" -gt "0"; then cat >>confdefs.h <<_ACEOF diff --git a/newlib/configure.ac b/newlib/configure.ac index bed444db0..97549ba32 100644 --- a/newlib/configure.ac +++ b/newlib/configure.ac @@ -410,6 +410,11 @@ EOF fi AC_SUBST(EXEEXT_FOR_BUILD) +AC_DEFINE(_NEWLIB_VERSION,"NEWLIB_VERSION","The newlib version in string format.") +AC_DEFINE(__NEWLIB__,NEWLIB_MAJOR_VERSION,"The newlib major version number.") +AC_DEFINE(__NEWLIB_MINOR__,NEWLIB_MINOR_VERSION,"The newlib minor version number.") +AC_DEFINE(__NEWLIB_PATCHLEVEL__,NEWLIB_PATCHLEVEL_VERSION,"The newlib patch level.") + if test "${newlib_elix_level}" -gt "0"; then AC_DEFINE_UNQUOTED(_ELIX_LEVEL, ${newlib_elix_level}, [EL/IX level]) fi