From ec150b21d9c9c9309e5c1713134e5b015b4a0f35 Mon Sep 17 00:00:00 2001 From: chao an Date: Sat, 29 Jun 2024 09:34:59 +0800 Subject: [PATCH] Revert "Check whether 64-bit atomic is supported" Signed-off-by: chao an --- openamp/libmetal.cmake | 21 --------------------- openamp/libmetal.defs | 16 ---------------- 2 files changed, 37 deletions(-) diff --git a/openamp/libmetal.cmake b/openamp/libmetal.cmake index 8a7dc7966c..41f3aa9d08 100644 --- a/openamp/libmetal.cmake +++ b/openamp/libmetal.cmake @@ -66,27 +66,6 @@ set(MACHINE ${CONFIG_ARCH}) set(CMAKE_SYSTEM_NAME NuttX) set(WITH_DOC OFF) -# cmake-format: off -set(ATOMIC_TEST_CODE - [-[ - #include - int main() { - _Atomic long long x = 0; - return x; - } - ]-] -) -# cmake-format: on - -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_atomic.c ${ATOMIC_TEST_CODE}) - -try_compile(HAS_64BIT_ATOMIC_SUPPORT ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/test_atomic.c) - -if(NOT HAS_64BIT_ATOMIC_SUPPORT) - add_compile_options(-DNO_ATOMIC_64_SUPPORT) -endif() - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libmetal ${CMAKE_CURRENT_BINARY_DIR}/libmetal EXCLUDE_FROM_ALL) diff --git a/openamp/libmetal.defs b/openamp/libmetal.defs index f307da1ff0..90e8a690be 100644 --- a/openamp/libmetal.defs +++ b/openamp/libmetal.defs @@ -56,20 +56,6 @@ CSRCS += libmetal/lib/version.c CFLAGS += -DMETAL_INTERNAL -# Check whether the current toolchain supports 64-bit atomic -ATOMIC_DETECT_CODE := detect_64_atomic.c -ATOMIC_DETECT_BIN := detect_64_atomic_bin -DETECT_ATOMIC_SUPPORT = \ - echo '\#include ' > $(ATOMIC_DETECT_CODE); \ - echo 'int main() { _Atomic long long x = 0; return x; }' >> $(ATOMIC_DETECT_CODE); \ - if $(CC) -o $(ATOMIC_DETECT_BIN) $(ATOMIC_DETECT_CODE) 2>/dev/null; then \ - echo ""; \ - else \ - echo "-DNO_ATOMIC_64_SUPPORT"; \ - fi; \ - -CFLAGS += $(shell $(DETECT_ATOMIC_SUPPORT)) - LIBMETAL_HDRS_SEDEXP := \ "s/@PROJECT_VERSION_MAJOR@/0/g; \ s/@PROJECT_VERSION_MINOR@/1/g; \ @@ -119,7 +105,5 @@ ifeq ($(wildcard libmetal/.git),) $(call DELFILE, libmetal.zip) endif $(call DELFILE, .libmetal_headers) - $(call DELFILE, $(ATOMIC_DETECT_CODE)) - $(call DELFILE, $(ATOMIC_DETECT_BIN)) endif