tmedicci commented on PR #14805: URL: https://github.com/apache/nuttx/pull/14805#issuecomment-2483699730
> __STDC_NO_ATOMICS__ Hi @zyfeier ! Thanks fo your quick response! In fact, `__STDC_NO_ATOMICS__` wasn't being set. I was able to make it work with the following patch: ``` diff --git a/arch/xtensa/src/lx6/Toolchain.defs b/arch/xtensa/src/lx6/Toolchain.defs index a979b9a0de..76fee69376 100644 --- a/arch/xtensa/src/lx6/Toolchain.defs +++ b/arch/xtensa/src/lx6/Toolchain.defs @@ -97,7 +97,7 @@ ifeq ($(CONFIG_ARCH_INSTRUMENT_ALL),y) ARCHOPTIMIZATION += -finstrument-functions endif -ARCHCFLAGS += -fno-common +ARCHCFLAGS := -fno-common ARCHCXXFLAGS += -fno-common ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas @@ -156,7 +156,7 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) endif ifeq ($(CONFIG_LIBC_ARCH_ATOMIC),y) - CFLAGS += -D__STDC_NO_ATOMICS__ + ARCHCFLAGS += -D__STDC_NO_ATOMICS__ endif # Default toolchain ``` I had to set `__STDC_NO_ATOMICS__` to `ARCHCFLAGS`. However, this flag was being set twice while compiling `esp32_boot.c` and a redefinition error occurred. That's why I had to change it to `ARCHCFLAGS := -fno-common` (to let it be defined instead of redefined to avoid duplication). I couldn't find `ARCHCFLAGS :=` anywhere else in the firmware (I couldn't understand why it was being redefined when processing `esp32_boot.c` too), so I'm not sure if this patch is acceptable. Any ideas? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org