From 1873f397dbe31feb112fe81a6e3623e355f0b2d6 Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Sat, 23 Mar 2024 13:20:09 +0000 Subject: [PATCH] More thorough check --- scripts/mk_util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/mk_util.py b/scripts/mk_util.py index bc462d3fc..d3426f342 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -330,7 +330,10 @@ def test_atomic_required(cc): }") """) t.commit() - return exec_compiler_cmd([cc, CPPFLAGS, '', 'tstatomic.cpp', LDFLAGS, '']) != 0 + fails_without = exec_compiler_cmd([cc, CPPFLAGS, '', 'tstatomic.cpp', LDFLAGS, '']) != 0 + ok_with = exec_compiler_cmd([cc, CPPFLAGS, '', 'tstatomic.cpp', LDFLAGS + ' -latomic', '']) == 0 + return fails_without and ok_with + def find_jni_h(path): for root, dirs, files in os.walk(path):