Skip to content

Commit

Permalink
fbc/android: don't worry about -sysroot when using clang, seems to be…
Browse files Browse the repository at this point in the history
… obsolete.
  • Loading branch information
rversteegen committed Jan 22, 2024
1 parent 696efde commit f301c43
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/compiler/fbc.bas
Expand Up @@ -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
Expand Down

0 comments on commit f301c43

Please sign in to comment.