build: check for 64bit stdatomic.h operations too

This fixes the build on platform where the atomic calls can't be turned into
lock-free instructions and thus need the external libatomic library (e.g. mips).
This commit is contained in:
Alessandro Ghedini authored and wm4 committed 2014-06-17 22:44:51 +02:00
1 parent 8ffef4be92
commit 84eebc6e4e
2 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -493,7 +493,8 @@ compile_check waftools/fragments/pthreads.c "$_ld_pthread" || die "Unable to fin
echores "yes"
check_statement_libs "support for stdatomic.h" auto STDATOMIC \
stdatomic.h '_Atomic int test = ATOMIC_VAR_INIT(123); int test2 = atomic_load(&test)'
stdatomic.h 'atomic_int_least64_t test = ATOMIC_VAR_INIT(123); int test2 = atomic_load(&test)' \
" " "-latomic"
_stdatomic=$(defretval)
_atomic=auto
+3 -3
View File
@@ -118,10 +118,10 @@ main_dependencies = [
}, {
'name': 'stdatomic',
'desc': 'stdatomic.h',
'func':
'func': check_libs(['atomic'],
check_statement('stdatomic.h',
'_Atomic int test = ATOMIC_VAR_INIT(123);'
'int test2 = atomic_load(&test)')
'atomic_int_least64_t test = ATOMIC_VAR_INIT(123);'
'int test2 = atomic_load(&test)'))
}, {
'name': 'atomic-builtins',
'desc': 'compiler support for __atomic built-ins',