1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

12 Commits

Author SHA1 Message Date
Marian Buschsieweke
2b2506c052
build system: Fix linker feature test with newlib 4.3.0
Before the build system used something like

    echo "int main(){} void _exit(int n) {(void)n;while(1);}" | LC_ALL=C $(LINK) -xc - -o /dev/null -lc -Wall -Wextra -pedantic <FLAGS_TO_TEST>

to check for flags supported by the compiler (used as linker frontend).
This however no longer works with newlib 4.3.0, which requires the
symbols `_sbrk_r`, `_close_r`, `_lseek_r`, `_read_r`, and `_write_r` to
be present. Instead, now a new file `minimal_linkable.c` was added that
adds all the missing symbols and is used in the linker feature tests
instead.
2023-02-02 20:47:37 +01:00
Marian Buschsieweke
c0e997a8e7
makefiles/libc/picolibc.mk: fix compilation with modern binutils
Modern binutils complain about segments with RWX permissions. While
this is indeed a bad habit, RIOT ignores segments permissions anyway.
(We do have a `mpu_noexec_ram` module to disable execution of all of
RAM, which would do so regardless of the segment permission.) So for
now, we can safely just disable the warning.

This fixes:

    /usr/lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld: warning: /home/maribu/Repos/software/RIOT/examples/default/bin/nucleo-f767zi/default.elf has a LOAD segment with RWX permissions
    collect2: error: ld returned 1 exit status
2022-11-12 17:09:11 +01:00
Marian Buschsieweke
0077e9ad70
makefiles/libc: fix wchar_t size warnings on LLVM
The test for the requirement of disabling wchar_t size warnings assumed
that $(CC) is used for linking, instead of $(LINK). With GCC $(LINK)
and $(CC) happen to be (in most cases) identical, but with LLVM they
are not. This results in issues with compiling with LLVM.
2022-11-07 15:02:03 +01:00
Marian Buschsieweke
e796a7394e
makefiles/libc/picolibc.mk: Fix typo 2022-05-30 12:38:19 +02:00
Sören Tempel
6dc6433663 picolibc: Reset color in error message if picolibc is not available
This is a regression which was introduced in #16114, without resetting
the color the red color will be used for all following text written to
the terminal and will also cause the shell prompt etc. pp. to be colored
in red which is undesirable. This commit fixes this regression by using
the ANSI escape sequences to reset the color after the error message has
been written.
2021-08-05 20:52:15 +02:00
Francisco Molina
cfe9e0f6a1
makefiles/libc/picolibc.mk: only fail when building 2021-03-01 13:47:53 +01:00
Karl Fessel
f7a8e0840d Improve meassaging suggest workarounds 2021-02-15 14:40:03 +01:00
Karl Fessel
f3c0a4e602 makefile/..picolib: make missing picolib fail louder 2021-02-15 14:07:42 +01:00
Benjamin Valentin
28d40eae6f picolibc: enable multiple heaps
We can simply re-use the same code from newlib.
2020-08-24 20:45:05 +02:00
Keith Packard
8c67544e7d picolibc: USE_MODULE += printf_float for float printf/scanf code [v2]
This makes RIOT use the integer-only printf/scanf code by default and
includes a new make parameter to select the full floating point
version. This saves about 6kB of text space when building hello-world
for the microbit board.

Signed-off-by: Keith Packard <keithp@keithp.com>

----

v2:
	Use USEMODULE=printf_float instead of separate parameter
2020-08-24 08:26:16 -07:00
79d733a1af picolibc: glue sbrk to heap start/end [v2]
---
v2:
	Squash fixes in
2020-08-24 08:26:16 -07:00
ff3bee24b9 picolibc: Provide integration into the build system [v3]
Support for picolibc as alternative libc implementation is added with
this commit. For now only cortex-m CPU's are supported.

Enable via PICOLIBC=1

---
v2:
	squash fixes in

v3:
	Remove picolibc integer printf/scanf stuff from sys/Makefile.include,
	it gets set in makefiles/libc/picolibc.mk

fixup for dependency
2020-08-23 13:12:57 -07:00