This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi] Wrong Newlib version strings, error when stdlib.h is included

Hello,

Toolchain arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi, downloaded from developer.arm.com/.../arm-gnu-toolchain-downloads

The following include:

Fullscreen
1
#include <stdlib.h>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

causes the error:

Fullscreen
1
token "@" is not valid in preprocessor expressions
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The reason is include/_newlib_version.h file, the Newlib version strings are defined as follows:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
/* 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@
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

For the record, gcc-arm-11.2-2022.02-x86_64-arm-none-eabi has the following defines:

Fullscreen
1
2
3
4
#define _NEWLIB_VERSION "4.1.0"
#define __NEWLIB__ 4
#define __NEWLIB_MINOR__ 1
#define __NEWLIB_PATCHLEVEL__ 0
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Hope this will be fixed soon.

Vadim Barshaw

0