mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
Merge pull request #18893 from maribu/makefiles/libc/picolibc.mk
makefiles/libc/picolibc.mk: fix compilation with modern binutils
This commit is contained in:
commit
643aeda471
@ -27,6 +27,14 @@ ifeq (1,$(USE_PICOLIBC))
|
||||
CFLAGS += -DPICOLIBC_INTEGER_PRINTF_SCANF
|
||||
LINKFLAGS += -DPICOLIBC_INTEGER_PRINTF_SCANF
|
||||
endif
|
||||
# For some reason segments with RWX permissions will be created with
|
||||
# picolibc. But since (as of now) RIOT only supports disabling the execute of
|
||||
# all RAM via the `mpu_noexec_ram` module, permissions of the segments are
|
||||
# ignored anyway. So for now, we just simply disable the warning.
|
||||
LINKER_SUPPORTS_NOWARNRWX ?= $(shell echo "int main(){} void _exit(int n) {(void)n;while(1);}" | LC_ALL=C $(LINK) -xc - -o /dev/null -lc -Wall -Wextra -pedantic -Wl,--no-warn-rwx-segments 2> /dev/null && echo 1 || echo 0)
|
||||
ifeq (1,$(LINKER_SUPPORTS_NOWARNRWX))
|
||||
LINKFLAGS += -Wl,--no-warn-rwx-segments
|
||||
endif
|
||||
endif
|
||||
|
||||
LINKFLAGS += -lc
|
||||
|
Loading…
Reference in New Issue
Block a user