Issue 52874
Summary build libc++ for armv6m-none-eabi failed
Labels new issue
Assignees
Reporter SquallATF
    this commit 92832e4889ae6038cc8b3e6e449af2a9b9374ab4 enable \<atomic\> when threads are disable.
but armv6m target does not have any signed/unsigned lock-free types
```
#define __CLANG_ATOMIC_BOOL_LOCK_FREE 1
#define __CLANG_ATOMIC_CHAR16_T_LOCK_FREE 1
#define __CLANG_ATOMIC_CHAR32_T_LOCK_FREE 1
#define __CLANG_ATOMIC_CHAR_LOCK_FREE 1
#define __CLANG_ATOMIC_INT_LOCK_FREE 1
#define __CLANG_ATOMIC_LLONG_LOCK_FREE 1
#define __CLANG_ATOMIC_LONG_LOCK_FREE 1
#define __CLANG_ATOMIC_POINTER_LOCK_FREE 1
#define __CLANG_ATOMIC_SHORT_LOCK_FREE 1
#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 1
#define __GCC_ATOMIC_BOOL_LOCK_FREE 1
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1
#define __GCC_ATOMIC_CHAR_LOCK_FREE 1
#define __GCC_ATOMIC_INT_LOCK_FREE 1
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1
#define __GCC_ATOMIC_LONG_LOCK_FREE 1
#define __GCC_ATOMIC_POINTER_LOCK_FREE 1
#define __GCC_ATOMIC_SHORT_LOCK_FREE 1
```
https://github.com/llvm/llvm-project/blob/3042091168e99323217223a959df8675bdfa9b3c/libcxx/include/atomic#L2680-L2698

libcxx build log
```
FAILED: src/CMakeFiles/cxx_static.dir/ryu/d2fixed.cpp.obj
E:\llvm14\bin\clang++.exe --target=armv6m-none-eabi  -DNDEBUG -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_LINK_PTHREAD_LIB -D_LIBCPP_LINK_RT_LIB -Iinclude/c++build -IK:/llvm-project/libcxx/src --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -ffunction-sections -fdata-sections -fno-ident --sysroot E:/llvm14/lib/clang-runtimes/armv6m_soft_nofp -D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION --target=armv6m-none-eabi -Os -DNDEBUG   --target=armv6m-none-eabi -DLIBCXX_BUILDING_LIBCXXABI -faligned-allocation -nostdinc++ -fvisibility-inlines-hidden -fvisibility=hidden -Wall -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wformat-nonliteral -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-error -fno-exceptions -fno-rtti -IK:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1 -std=c++2a -MD -MT src/CMakeFiles/cxx_static.dir/ryu/d2fixed.cpp.obj -MF src\CMakeFiles\cxx_static.dir\ryu\d2fixed.cpp.obj.d -o src/CMakeFiles/cxx_static.dir/ryu/d2fixed.cpp.obj -c K:/llvm-project/libcxx/src/ryu/d2fixed.cpp
In file included from K:/llvm-project/libcxx/src/ryu/d2fixed.cpp:45:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/system_error:151:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/string:522:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/algorithm:653:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/functional:506:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__functional/function.h:21:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__memory/shared_ptr.h:35:
K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/atomic:2696:16: error: use of undeclared identifier '__libcpp_signed_lock_free'; did you mean '__libcpp_signed_integer'?
typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free;
               ^~~~~~~~~~~~~~~~~~~~~~~~~
               __libcpp_signed_integer
K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__concepts/arithmetic.h:42:9: note: '__libcpp_signed_integer' declared here
concept __libcpp_signed_integer = __libcpp_is_signed_integer<_Tp>::value;
        ^
In file included from K:/llvm-project/libcxx/src/ryu/d2fixed.cpp:45:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/system_error:151:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/string:522:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/algorithm:653:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/functional:506:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__functional/function.h:21:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__memory/shared_ptr.h:35:
K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/atomic:2696:16: error: too few template arguments for concept '__libcpp_signed_integer'
typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free;
               ^
K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__concepts/arithmetic.h:42:9: note: template is declared here
concept __libcpp_signed_integer = __libcpp_is_signed_integer<_Tp>::value;
        ^
In file included from K:/llvm-project/libcxx/src/ryu/d2fixed.cpp:45:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/system_error:151:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/string:522:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/algorithm:653:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/functional:506:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__functional/function.h:21:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__memory/shared_ptr.h:35:
K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/atomic:2697:16: error: use of undeclared identifier '__libcpp_unsigned_lock_free'; did you mean '__libcpp_unsigned_integer'?
typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
               __libcpp_unsigned_integer
K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__concepts/arithmetic.h:40:9: note: '__libcpp_unsigned_integer' declared here
concept __libcpp_unsigned_integer = __libcpp_is_unsigned_integer<_Tp>::value;
        ^
In file included from K:/llvm-project/libcxx/src/ryu/d2fixed.cpp:45:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/system_error:151:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/string:522:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/algorithm:653:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/functional:506:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__functional/function.h:21:
In file included from K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__memory/shared_ptr.h:35:
K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/atomic:2697:16: error: too few template arguments for concept '__libcpp_unsigned_integer'
typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;
               ^
K:/llvm14build/armv6m_soft_nofp/libcxx/include/c++/v1/__concepts/arithmetic.h:40:9: note: template is declared here
concept __libcpp_unsigned_integer = __libcpp_is_unsigned_integer<_Tp>::value;
        ^
4 errors generated.
```

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to