From 296e642f092269555db03570c0cc4aea770c14ab Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 24 Apr 2025 20:52:55 +0300 Subject: [PATCH] wscript: look for libm when compiling for Android on Android device itself (e.g. Termux) --- wscript | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index 016d1fa2..53992ca2 100644 --- a/wscript +++ b/wscript @@ -456,7 +456,10 @@ def configure(conf): elif conf.env.DEST_OS == 'android': conf.check_cc(lib='dl') conf.check_cc(lib='log') - # LIB_M added in xcompile! + if not conf.options.ANDROID_OPTS: + # if we're compiling on device itself + conf.check_cc(lib='m') + # otherwise LIB_M is defined by xcompile (as it might be libm_hard, depending on NDK configuration) elif conf.env.DEST_OS == 'win32': # Common Win32 libraries # Don't check them more than once, to save time