Newlib cannot be built by Crosstool-NG arc-2023.09
Closed this issue · 4 comments
The problem is that CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y
option was removed from the latest configurations fro baremetal targets. This option is mandatory for the latest Newlib but somehow it was not included in released configurations. However, binary bundles for arc-2023.09 release were built with CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y
.
Here is an error message:
[INFO ] Installing C library
[EXTRA] Configuring C library
[EXTRA] Building C library
[ERROR] configure: error: bad value no for newlib-global-atexit option
[ERROR] checking target system type... make[2]: *** [Makefile:8448: configure-target-newlib] Error 1
[ERROR] make[2]: *** Waiting for unfinished jobs....
[ERROR] make[1]: *** [Makefile:879: all] Error 2
Here is the corresponding commit and line:
@kolerov here's what I see:
[arcoss@087e993d579e crosstool-ng]$ cat defconfig | grep CT_LIBC_NEWLIB_GLOBAL_ATEXIT
CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y
[arcoss@087e993d579e crosstool-ng]$ cat logs-arc-elf32-win/arc-elf32-win-defconfig | grep CT_LIBC_NEWLIB_GLOBAL_ATEXIT
[arcoss@087e993d579e crosstool-ng]$ cat .config | grep CT_LIBC_NEWLIB_GLOBAL_ATEXIT
CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y
First is generated by our tools, second is the result of savedefconfig
and the last is final config. So the issue caused by ./ct-ng savedefconfig
command.
Using arc-2023.03
branch (672f4057ddb4dc678c07b96e99eed2e4e929d6e4
):
[arcoss@087e993d579e crosstool-ng]$ cat defconfig | grep CT_LIBC_NEWLIB_GLOBAL_ATEXIT
CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y
[arcoss@087e993d579e crosstool-ng]$ cat logs-arc-elf32-win/arc-elf32-win-defconfig | grep CT_LIBC_NEWLIB_GLOBAL_ATEXIT
CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y
[arcoss@087e993d579e crosstool-ng]$ cat .config | grep CT_LIBC_NEWLIB_GLOBAL_ATEXIT
CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y
@kolerov Here's the commit that causes this: foss-for-synopsys-dwc-arc-processors/crosstool-ng@227d99d. Note that LIBC_NEWLIB_GLOBAL_ATEXIT
is enabled by default, so that shouldn't be an issue.
@kolerov I guess you used arc-2023.09
which is not the version which was used to build the release, it's arc-2023.09-rebased
. Let's see if we want to replace arc-2023.09-rebased
-> arc-2023.09
or keep things as is and just cherry pick those commits.