编译最新的sdk v4.0 老是报错,查看是stdatomic.h文件里报错
Posted: Thu Feb 13, 2020 6:16 am
In file included from /home/bruce/esp-idf-v4.0/components/driver/spi_master.c:140:0:
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h: In function 'atomic_flag_test_and_set_explicit':
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:246:2: error: implicit declaration of function '__c11_atomic_exchange' [-Werror=implicit-function-declaration]
__c11_atomic_exchange(object, desired, order)
^
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:312:17: note: in expansion of macro 'atomic_exchange_explicit'
return ((_Bool)atomic_exchange_explicit(&__object->__flag, 1, __order));
^
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h: In function 'atomic_flag_clear_explicit':
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:260:2: error: implicit declaration of function '__c11_atomic_store' [-Werror=implicit-function-declaration]
__c11_atomic_store(object, desired, order)
^
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:319:2: note: in expansion of macro 'atomic_store_explicit'
atomic_store_explicit(&__object->__flag, 0, __order);
^
/home/bruce/esp-idf-v4.0/components/driver/spi_master.c: In function 'spi_bus_free':
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:258:2: error: implicit declaration of function '__c11_atomic_load' [-Werror=implicit-function-declaration]
__c11_atomic_load(object, order)
^
我也没找到这些函数的定义,请问该如何解决?
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h: In function 'atomic_flag_test_and_set_explicit':
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:246:2: error: implicit declaration of function '__c11_atomic_exchange' [-Werror=implicit-function-declaration]
__c11_atomic_exchange(object, desired, order)
^
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:312:17: note: in expansion of macro 'atomic_exchange_explicit'
return ((_Bool)atomic_exchange_explicit(&__object->__flag, 1, __order));
^
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h: In function 'atomic_flag_clear_explicit':
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:260:2: error: implicit declaration of function '__c11_atomic_store' [-Werror=implicit-function-declaration]
__c11_atomic_store(object, desired, order)
^
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:319:2: note: in expansion of macro 'atomic_store_explicit'
atomic_store_explicit(&__object->__flag, 0, __order);
^
/home/bruce/esp-idf-v4.0/components/driver/spi_master.c: In function 'spi_bus_free':
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:258:2: error: implicit declaration of function '__c11_atomic_load' [-Werror=implicit-function-declaration]
__c11_atomic_load(object, order)
^
我也没找到这些函数的定义,请问该如何解决?