From 2f37c967e1d1bf171220d2725800a946216e21af Mon Sep 17 00:00:00 2001 From: david gauchard Date: Sun, 20 Jun 2021 19:31:50 +0200 Subject: [PATCH] gnu source: honoring libc requirements (#8147) --- platform.txt | 2 +- tools/platformio-build.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platform.txt b/platform.txt index 5b4a1442c5..88d9c82b5a 100644 --- a/platform.txt +++ b/platform.txt @@ -56,7 +56,7 @@ compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/ compiler.sdk.path={runtime.platform.path}/tools/sdk compiler.libc.path={runtime.platform.path}/tools/sdk/libc/xtensa-lx106-elf -compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/{build.lwip_include}" "-I{compiler.libc.path}/include" "-I{build.path}/core" +compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/{build.lwip_include}" "-I{compiler.libc.path}/include" "-I{build.path}/core" compiler.c.cmd=xtensa-lx106-elf-gcc compiler.c.flags=-c {compiler.warning_flags} -std=gnu17 {build.stacksmash_flags} -Os -g -free -fipa-pta -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -ffunction-sections -fdata-sections {build.exception_flags} {build.sslflags} {build.mmuflags} {build.non32xferflags} diff --git a/tools/platformio-build.py b/tools/platformio-build.py index d8a97982a5..35a88fe446 100644 --- a/tools/platformio-build.py +++ b/tools/platformio-build.py @@ -73,6 +73,7 @@ def scons_patched_match_splitext(path, suffixes=None): "-mtext-section-literals", "-falign-functions=4", "-U__STRICT_ANSI__", + "-D_GNU_SOURCE", "-ffunction-sections", "-fdata-sections", "-Wall",