From f301c43045883970db2446f6d0f5e56fd69556fc Mon Sep 17 00:00:00 2001 From: Ralph Versteegen Date: Tue, 23 Jan 2024 01:05:49 +1300 Subject: [PATCH] fbc/android: don't worry about -sysroot when using clang, seems to be obsolete. --- src/compiler/fbc.bas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/fbc.bas b/src/compiler/fbc.bas index 1fe7fd617..b08fc0278 100644 --- a/src/compiler/fbc.bas +++ b/src/compiler/fbc.bas @@ -784,8 +784,11 @@ private function hLinkFiles( ) as integer ldcline += "-m armelf_linux_eabi " end select case FB_COMPTARGET_ANDROID - if( len( fbc.sysroot ) = 0 ) then - '' We need the sysroot before calling hFindLib(). + if( (len( fbc.sysroot ) = 0) and _ + (fbGetOption( FB_COMPOPT_BACKEND ) = FB_BACKEND_GCC) ) then + '' Newer NDKs use clang which doesn't support -print-sysroot, + '' and we don't need it. + '' GCC in older NDKs may need the sysroot before calling hFindLib(). '' At least in older NDKs, if a standalone NDK toolchain (for a particular '' platform+arch) is used then gcc --print-sysroot returns the correct '' sysroot. Otherwise, running directly from a full NDK install, it prints a