aports/community/newlib/0001-msp430-enable-syscalls.patch
Marian Buschsieweke a431beac21 community/newlib: add missing nano.specs and syscalls for msp430-elf
For MSP430 no nano.specs is installed for the MSP430 toolchain. Likely
most MSP430 users only install the nano variant and don't build a full
fledged version of newlib. To ease packaging, for consistency, and also
in case some MSP430 users do want a full fledged newlib version,
stick with providing both versions but also provide a simple nano.specs
file to make using the nano variant possible.

Additionally, syscalls where disabled for msp430. The resulted in the
functions provided by the standard C lib such as puts() or printf()
to be defunct, as the hooks integrating with an RTOS such as RIOT
where never called. This patches newlib to also use syscalls with
MSP430.
2023-05-10 01:54:53 +00:00

19 lines
677 B
Diff

By default newlib will disable syscalls for MPS430, which means defunct puts(),
printf(), etc. Since providing those is the main purpose of a standard c lib,
this makes little sense.
This enable syscalls again. With it, MCU operating systems such as RIOT can
provide functioning puts, printf(), read(), write(), etc.
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -781,6 +781,9 @@
default_newlib_io_long_long="yes"
newlib_cflags="${newlib_cflags} -Os -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
;;
+ msp430*)
+ syscall_dir=syscalls
+ ;;
nios2*)
syscall_dir=
newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"