Fix problem with _newlib_version.h not being filled in correctly

This commit is contained in:
Jeff Johnston 2022-08-22 17:54:43 -04:00
parent c3e92052bb
commit 64a11fded1
3 changed files with 22 additions and 11 deletions

View File

@ -2,16 +2,9 @@
#ifndef _NEWLIB_VERSION_H__ #ifndef _NEWLIB_VERSION_H__
#define _NEWLIB_VERSION_H__ 1 #define _NEWLIB_VERSION_H__ 1
/* The newlib version in string format. */ #undef _NEWLIB_VERSION
#define _NEWLIB_VERSION "@NEWLIB_VERSION@" #undef __NEWLIB__
#undef __NEWLIB_MINOR__
/* The newlib major version number. */ #undef __NEWLIB_PATCHLEVEL__
#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@
#endif /* !_NEWLIB_VERSION_H__ */ #endif /* !_NEWLIB_VERSION_H__ */

13
newlib/configure vendored
View File

@ -6396,6 +6396,19 @@ $as_echo "$newlib_cv_build_exeext" >&6; }
fi 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 if test "${newlib_elix_level}" -gt "0"; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF

View File

@ -410,6 +410,11 @@ EOF
fi fi
AC_SUBST(EXEEXT_FOR_BUILD) 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 if test "${newlib_elix_level}" -gt "0"; then
AC_DEFINE_UNQUOTED(_ELIX_LEVEL, ${newlib_elix_level}, [EL/IX level]) AC_DEFINE_UNQUOTED(_ELIX_LEVEL, ${newlib_elix_level}, [EL/IX level])
fi fi